Skip to content

Commit

Permalink
[chore] add new metric with input_type configuration to avoid regress…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
atoulme committed Mar 18, 2024
1 parent 8574df3 commit 06f4207
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cmd/mdatagen/internal/samplereceiver/documentation.md
Expand Up @@ -42,6 +42,24 @@ The metric will be will be removed soon.
| ---- | ----------- | ---------- | ----------------------- | --------- |
| s | Sum | Double | Delta | false |

### metric.input_type

Monotonic cumulative sum int metric with string input_type enabled by default.

| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| s | Sum | Int | Cumulative | true |

#### Attributes

| Name | Description | Values |
| ---- | ----------- | ------ |
| string_attr | Attribute with any string value. | Any Str |
| state | Integer attribute with overridden name. | Any Int |
| enum_attr | Attribute with a known set of string values. | Str: ``red``, ``green``, ``blue`` |
| slice_attr | Attribute with a slice value. | Any Slice |
| map_attr | Attribute with a map value. | Any Map |

## Optional Metrics

The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -5,6 +5,8 @@ all_set:
enabled: true
default.metric.to_be_removed:
enabled: true
metric.input_type:
enabled: true
optional.metric:
enabled: true
optional.metric.empty_unit:
Expand Down Expand Up @@ -32,6 +34,8 @@ none_set:
enabled: false
default.metric.to_be_removed:
enabled: false
metric.input_type:
enabled: false
optional.metric:
enabled: false
optional.metric.empty_unit:
Expand Down
11 changes: 11 additions & 0 deletions cmd/mdatagen/internal/samplereceiver/metadata.yaml
Expand Up @@ -137,3 +137,14 @@ metrics:
aggregation_temporality: delta
warnings:
if_enabled: This metric is deprecated and will be removed soon.

metric.input_type:
enabled: true
description: Monotonic cumulative sum int metric with string input_type enabled by default.
unit: s
sum:
value_type: int
input_type: string
monotonic: true
aggregation_temporality: cumulative
attributes: [ string_attr, overridden_int_attr, enum_attr, slice_attr, map_attr ]

0 comments on commit 06f4207

Please sign in to comment.