Skip to content

Commit

Permalink
feat: configure extra headers in metrics request
Browse files Browse the repository at this point in the history
  • Loading branch information
malteo committed Feb 22, 2024
1 parent e36944b commit abd9723
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2090,10 +2090,9 @@ public static class ConfigurationEnvironment implements DTO
@ApiModelProperty( "The minimum date for statistics calculation" )
private Date startStatisticsCalculationFrom = new Date( 0L );

@ApiModelProperty( "The available polling frequencies for metrics" )
@NotNull
@ApiModelProperty( "Send these extra headers to the HTTP request to obtain application metrics" )
@Valid
private List<EntryDTO> metricFrequencyValues;
private List<EntryDTO> metricRequestExtraHeaders = new ArrayList<>();

@ApiModelProperty( "The cloud provider names enabled for this environment" )
private List<String> enabledCloudProviders;
Expand Down Expand Up @@ -2380,14 +2379,19 @@ public void setStartStatisticsCalculationFrom( Date startStatisticsCalculationFr
this.startStatisticsCalculationFrom = startStatisticsCalculationFrom;
}

public List<EntryDTO> getMetricFrequencyValues()
public List<EntryDTO> getMetricRequestExtraHeaders()
{
return metricRequestExtraHeaders;
}

public void setMetricRequestExtraHeaders( List<EntryDTO> metricRequestExtraHeaders )
{
return metricFrequencyValues;
this.metricRequestExtraHeaders = metricRequestExtraHeaders;
}

public void setMetricFrequencyValues( List<EntryDTO> metricFrequencyValues )
public void setMetricRequestExtraHeaders( String name, String value )
{
this.metricFrequencyValues = metricFrequencyValues;
this.metricRequestExtraHeaders = List.of( new EntryDTO( name, value ) );
}

public List<String> getEnabledCloudProviders()
Expand Down

0 comments on commit abd9723

Please sign in to comment.