feat: add Dash0 data source type, metric, and direct config#895
Open
feat: add Dash0 data source type, metric, and direct config#895
Conversation
## Motivation Add Dash0 as a new data source type for the Prometheus-compatible monitoring platform with bearer token authentication. ## Summary - Add Dash0 to DataSourceType enum and generated code - Add Dash0Metric with PromQL field and validation - Add Dash0Config for Direct with URL, AccessToken, Step - Add query delay default (0s) and data retrieval max (30 days) - Register Dash0 as valid direct type
Contributor
Author
- Add Dash0Config to agent Spec with URL and Step - Add Dash0 to agent GetType switch - Add Dash0 to agentDataRetrievalMaxDuration - Add agent, direct, and SLO examples for Dash0 - Add Dash0 to validateExactlyOneMetricSpecType - Add Dash0 to validMetricSpecs test map
- Add dash0Validation for agent (URL required, step >= 15) - Add dash0Validation for direct (URL required, accessToken required) - Add Dash0 to exactlyOneDataSourceTypeValidationRule in both agent and direct - Add Dash0 to validAgentSpec and validDirectSpec test maps - Add omitempty to Dash0Metric.PromQL json tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add Dash0 as a new data source type. Dash0 is a Prometheus-compatible monitoring platform with bearer token authentication, supporting both Agent and Direct modes.
Summary
Dash0toDataSourceTypeenum and generated code (value 29)Dash0MetricwithPromQLfield and validation inslo/metrics_dash0.goDash0Configfor Direct (URL,AccessToken,Step) and Agent (URL,Step)Dash0toMetricSpec,DataSourceType(),Query(), andvalidateExactlyOneMetricSpecTypeDash0as valid direct typeDash0tovalidMetricSpecstest mapRelated Changes
Testing
TestValidateExactlyOneMetricSpecTypeupdated to cover Dash0