You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkg/ottl: add metric.metadata as a valid path in OTTL (#40217)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Allow OTTL to get and set metric metadata.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes#40214.
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests
<!--Describe the documentation added.-->
#### Documentation
Updated readme
Example statement that now works:
- set(metric.metadata["k"], "v") where
metric.metadata["prometheus.type"] == "unknown"
<!--Please delete paragraphs that you did not use before submitting.-->
---------
Signed-off-by: Ridwan Sharif <[email protected]>
Co-authored-by: Evan Bradley <[email protected]>
Copy file name to clipboardExpand all lines: pkg/ottl/contexts/ottlmetric/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ The following paths are supported.
26
26
| metric.description | the description of the metric | string |
27
27
| metric.unit | the unit of the metric | string |
28
28
| metric.type | the data type of the metric | int64 |
29
+
| metric.metadata | metadata associated with the metric | pcommon.Map |
29
30
| metric.aggregation_temporality | the aggregation temporality of the metric | int64 |
30
31
| metric.is_monotonic | the monotonicity of the metric | bool |
31
32
| metric.data_points | the data points of the metric | pmetric.NumberDataPointSlice, pmetric.HistogramDataPointSlice, pmetric.ExponentialHistogramDataPointSlice, or pmetric.SummaryDataPointSlice |
0 commit comments