Skip to content

Commit

Permalink
[chore] Update Azure Event Hub Receiver Documentation (open-telemetry…
Browse files Browse the repository at this point in the history
…#28623)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
The Documentation surrounding Azure Event Hub Metric creation is
out-of-date or not accurate.

**Link to tracking Issue:** <Issue number if applicable>

open-telemetry#28622

**Testing:** <Describe what testing was performed and which tests were
added.>
No code was modified, only documentation.

**Documentation:** <Describe the documentation added.>
Updated the README.md in reciever/azureeventhub to be more accurate and
improved the Metric mapping table to be consistent with the Log section.
  • Loading branch information
cparkins authored and RoryCrispin committed Nov 24, 2023
1 parent 1ad5710 commit 544655d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 15 deletions.
27 changes: 27 additions & 0 deletions .chloggen/eventhubreceiver-update-readme-for-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: azureeventhubreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Updated documentation around Azure Metric to OTel mapping.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [28622]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
31 changes: 16 additions & 15 deletions receiver/azureeventhubreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,21 @@ JSON numbers are encoded as doubles.
For Metrics the Azure Metric Records are an array
of "records" with the following fields.
| Azure |
|------------|
| time |
| resourceId |
| metricName |
| timeGrain |
| total |
| count |
| minimum |
| maximum |
| average |
From this data a Metric of type Summary is created
with a single Data Point that represents the value
from the "total" field.
| Azure | Open Telemetry |
|------------|---------------------------------------------|
| time | time_unix_nano (field) |
| resourceId | azure.resource.id (resource attribute) |
| metricName | |
| timeGrain | start_time_unix_nano (field) |
| total | mapped to datapoint metricName + "_TOTAL" |
| count | mapped to datapoint metricName + "_COUNT" |
| minimum | mapped to datapoint metricName + "_MINIMUM" |
| maximum | mapped to datapoint metricName + "_MAXIMUM" |
| average | mapped to datapoint metricName + "_AVERAGE" |
From this data a Metric of type Gauge is created
with a Data Points that represents the values
for the Metric including: Total, Minimum, Maximum,
Average and Count.
[storage extension]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage

0 comments on commit 544655d

Please sign in to comment.