Skip to content

Commit

Permalink
implement Atlas id= query param, set via fetchId in atlas named accou…
Browse files Browse the repository at this point in the history
…nt config (#125)
  • Loading branch information
Michael Graff committed Nov 16, 2017
1 parent 538709f commit 5f50cde
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ MetricsService atlasMetricsService(AtlasConfigurationProperties atlasConfigurati
.builder()
.name(name)
.credentials(atlasCredentials)
.fetchId(atlasManagedAccount.getFetchId())
.backendUpdater(updater);

if (!CollectionUtils.isEmpty(supportedTypes)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ public class AtlasManagedAccount {
@NotNull
String backendsJsonBaseUrl;

String fetchId;

private List<AccountCredentials.Type> supportedTypes;
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public List<MetricSet> queryMetrics(String accountName,
List<AtlasResults> atlasResultsList = atlasRemoteService.fetch(decoratedQuery,
atlasCanaryScope.getStart().toEpochMilli(),
atlasCanaryScope.getEnd().toEpochMilli(),
isoStep);
isoStep,
credentials.getFetchId());
Map<String, AtlasResults> idToAtlasResultsMap = AtlasResultsHelper.merge(atlasResultsList);
List<MetricSet> metricSetList = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class AtlasNamedAccountCredentials implements AccountCredentials<AtlasCre
@NotNull
private AtlasCredentials credentials;

private String fetchId;

@Override
public String getType() {
return "atlas";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ public interface AtlasRemoteService {
List<AtlasResults> fetch(@Query("q") String q,
@Query("s") Long start,
@Query("e") Long end,
@Query("step") String step);
@Query("step") String step,
@Query("id") String id);
}

0 comments on commit 5f50cde

Please sign in to comment.