-
Notifications
You must be signed in to change notification settings - Fork 27
Configure exporter default aggregation and temporality preference #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ | |
"$ref": "#/$defs/OtlpMetric" | ||
}, | ||
"console": { | ||
"$ref": "common.json#/$defs/Console" | ||
"$ref": "#/$defs/ConsoleMetric" | ||
}, | ||
"prometheus": { | ||
"$ref": "#/$defs/Prometheus" | ||
|
@@ -113,6 +113,9 @@ | |
}, | ||
"with_resource_constant_labels": { | ||
"$ref": "common.json#/$defs/IncludeExclude" | ||
}, | ||
"default_aggregation_by_instrument_kind": { | ||
"$ref": "#/$defs/DefaultAggregationByInstrumentKind" | ||
} | ||
} | ||
}, | ||
|
@@ -167,14 +170,10 @@ | |
"minimum": 0 | ||
}, | ||
"temporality_preference": { | ||
"type": ["string", "null"] | ||
"$ref": "#/$defs/AggregationTemporalityPreference" | ||
}, | ||
"default_histogram_aggregation": { | ||
"type": ["string", "null"], | ||
"enum": [ | ||
"explicit_bucket_histogram", | ||
"base2_exponential_bucket_histogram" | ||
] | ||
"default_aggregation_by_instrument_kind": { | ||
"$ref": "#/$defs/DefaultAggregationByInstrumentKind" | ||
}, | ||
"insecure": { | ||
"type": ["boolean", "null"] | ||
|
@@ -186,6 +185,116 @@ | |
], | ||
"title": "OtlpMetric" | ||
}, | ||
"AggregationTemporalityPreferenceByInstrumentKind": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"counter": { | ||
"$ref": "#/$defs/AggregationTemporality" | ||
}, | ||
"histogram": { | ||
"$ref": "#/$defs/AggregationTemporality" | ||
}, | ||
"observable_counter": { | ||
"$ref": "#/$defs/AggregationTemporality" | ||
}, | ||
"observable_gauge": { | ||
"$ref": "#/$defs/AggregationTemporality" | ||
}, | ||
"observable_up_down_counter": { | ||
"$ref": "#/$defs/AggregationTemporality" | ||
}, | ||
"up_down_counter": { | ||
"$ref": "#/$defs/AggregationTemporality" | ||
} | ||
} | ||
}, | ||
"AggregationTemporalityPreference": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The spec says that aggregation temporality should be configurable as a function of instrument kind, but most users will want to use these shorthand options. This is much simpler / more compact than writing the preference for each instrument kind. In the future, we can add a separate property to give full control over temporality by instrument kind if needed. |
||
"type": ["string", "null"], | ||
"enum": [ | ||
"delta", | ||
"cumulative", | ||
"low_memory" | ||
] | ||
}, | ||
"DefaultAggregationByInstrumentKind": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"counter": { | ||
"$ref": "#/$defs/Aggregation" | ||
}, | ||
"histogram": { | ||
"$ref": "#/$defs/Aggregation" | ||
}, | ||
"observable_counter": { | ||
"$ref": "#/$defs/Aggregation" | ||
}, | ||
"observable_gauge": { | ||
"$ref": "#/$defs/Aggregation" | ||
}, | ||
"observable_up_down_counter": { | ||
"$ref": "#/$defs/Aggregation" | ||
}, | ||
"up_down_counter": { | ||
"$ref": "#/$defs/Aggregation" | ||
} | ||
} | ||
}, | ||
"Aggregation": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lifting this aggregation type def up from the view stream definition. Its now reused both for view stream config and in exporter default aggregation config. |
||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"minProperties": 1, | ||
"maxProperties": 1, | ||
"properties": { | ||
"default": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
}, | ||
"drop": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
}, | ||
"explicit_bucket_histogram": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"boundaries": { | ||
"type": "array", | ||
"items": { | ||
"type": "number" | ||
} | ||
}, | ||
"record_min_max": { | ||
"type": ["boolean", "null"] | ||
} | ||
} | ||
}, | ||
"base2_exponential_bucket_histogram": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"max_scale": { | ||
"type": ["integer", "null"] | ||
}, | ||
"max_size": { | ||
"type": ["integer", "null"] | ||
}, | ||
"record_min_max": { | ||
"type": ["boolean", "null"] | ||
} | ||
} | ||
}, | ||
"last_value": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
}, | ||
"sum": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"View": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
|
@@ -235,58 +344,7 @@ | |
"type": ["string", "null"] | ||
}, | ||
"aggregation": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"minProperties": 1, | ||
"maxProperties": 1, | ||
"properties": { | ||
"default": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
}, | ||
"drop": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
}, | ||
"explicit_bucket_histogram": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"boundaries": { | ||
"type": "array", | ||
"items": { | ||
"type": "number" | ||
} | ||
}, | ||
"record_min_max": { | ||
"type": ["boolean", "null"] | ||
} | ||
} | ||
}, | ||
"base2_exponential_bucket_histogram": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"max_scale": { | ||
"type": ["integer", "null"] | ||
}, | ||
"max_size": { | ||
"type": ["integer", "null"] | ||
}, | ||
"record_min_max": { | ||
"type": ["boolean", "null"] | ||
} | ||
} | ||
}, | ||
"last_value": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
}, | ||
"sum": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false | ||
} | ||
} | ||
"$ref": "#/$defs/Aggregation" | ||
}, | ||
"attribute_keys": { | ||
"type": "array", | ||
|
@@ -297,6 +355,18 @@ | |
} | ||
} | ||
} | ||
}, | ||
"ConsoleMetric": { | ||
"type": ["object", "null"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"temporality_preference": { | ||
"$ref": "#/$defs/AggregationTemporalityPreference" | ||
}, | ||
"default_aggregation_by_instrument_kind": { | ||
"$ref": "#/$defs/DefaultAggregationByInstrumentKind" | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if I want to
I see that there is a yaml anchor - but I'm not sure this should be the only option to share values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using anchors makes using the config easier. No need to merge properties from some global exporter config with per-exporter config. And simplifies the schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a lesser known and complicated feature