Skip to content
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

[chore] [pkg/translator/prometheus] Update documentation #23209

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Jun 6, 2023

  • Describe transformations currently applied in the Prometheus receiver
  • Fix crypto.dogecoin.value_dollars->crypto_dogecoin_value_dollars typo

Missing translations reported in #23208

@dmitryax dmitryax requested a review from a team June 6, 2023 23:29
@dmitryax dmitryax requested a review from dashpole as a code owner June 6, 2023 23:29
Comment on lines +23 to +34
| Case | Transformation | Example |
|----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| Unsupported characters and extraneous underscores | Replace unsupported characters with underscores (`_`). Drop redundant, leading and trailing underscores. | `(lambda).function.executions(#)` → `lambda_function_executions` |
| Standard unit | Convert the unit from [Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) to Prometheus standard and append | `system.filesystem.usage` with unit `By` → `system_filesystem_usage_bytes` |
| Non-standard unit (unit is surrounded with `{}`) | Drop the unit | `system.network.dropped` with unit `{packets}` → `system_network_dropped` |
| Non-standard unit (unit is **not** surrounded with `{}`) | Append the unit, if not already present, after sanitization (all non-alphanumeric chars are dropped) | `system.network.dropped` with unit `packets` → `system_network_dropped_packets` |
| Percentages (unit is `1`) | Append `_ratio` (for gauges only) | `system.memory.utilization` with unit `1` → `system_memory_utilization_ratio` |
| Percentages (unit is `%`) | Replace `%` with `percent` `_percent` | `storage.filesystem.utilization` with unit `%` → `storage_filesystem_utilization_percent` |
| Rates (unit contains `/`) | Replace `/` with `per` | `astro.light.speed` with unit `m/s` → `astro_light_speed_meters_per_second` |
| Dollars (unit is `$`) | Replace `$` with `dollars` | `crypto.dogecoin.value` with unit `$` → `crypto_dogecoin_value_dollars` |
| Counter | Append `_total` | `system.processes.created` → `system_processes_created_total` |

Copy link
Member Author

@dmitryax dmitryax Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block doesn't have any changes other than replacing ==> with and fixing crypto.dogecoin.value_dollars with crypto_dogecoin_value_dollars

@dmitryax dmitryax force-pushed the update-normalization-docs branch from 4f4edfc to 3a7dec2 Compare June 6, 2023 23:31
@dmitryax dmitryax changed the title [chore] [pkg/translator/prometheus] Document Prometheus->OTel conversion [chore] [pkg/translator/prometheus] Update Readme Jun 6, 2023
@dmitryax dmitryax changed the title [chore] [pkg/translator/prometheus] Update Readme [chore] [pkg/translator/prometheus] Update documentation Jun 6, 2023
pkg/translator/prometheus/README.md Outdated Show resolved Hide resolved
@dmitryax dmitryax force-pushed the update-normalization-docs branch 2 times, most recently from 5de2393 to 371ea99 Compare June 7, 2023 06:18
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Describe transformations currently applied in the Prometheus receiver in README.md
@dmitryax dmitryax force-pushed the update-normalization-docs branch from 371ea99 to 2da3530 Compare June 7, 2023 15:46
@dmitryax dmitryax merged commit 816183e into open-telemetry:main Jun 7, 2023
@github-actions github-actions bot added this to the next release milestone Jun 7, 2023
@dmitryax dmitryax deleted the update-normalization-docs branch June 8, 2023 23:01
Caleb-Hurshman pushed a commit to observIQ/opentelemetry-collector-contrib that referenced this pull request Jul 6, 2023
…try#23209)

- Describe transformations currently applied in the Prometheus receiver
- Fix `crypto.dogecoin.value_dollars`-> `crypto_dogecoin_value_dollars` typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants