Skip to content

Commit

Permalink
fix(agent/loki): find default loki datasource instead of all datasour…
Browse files Browse the repository at this point in the history
…ces (#298)
  • Loading branch information
PierreDemailly authored Aug 30, 2024
1 parent 46994a1 commit 20e0a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/agent/src/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class Datasource {

const datasources = await this.datasource.fetchDatasources();
const lokiDatasources = datasources.filter((datasource) => datasource.type === "loki")!;
const datasource = datasources.find((datasource) => datasource.isDefault) ?? lokiDatasources.at(0)!;
const datasource = lokiDatasources.find((lokiDatasource) => lokiDatasource.isDefault) ?? lokiDatasources.at(0)!;
this.cache = datasource;

return datasource;
Expand Down

0 comments on commit 20e0a4c

Please sign in to comment.