Skip to content

Commit

Permalink
Add support for 1-second Storage Resolution in the AWS EMF Exporter (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#36057)

This change implements the capability for users of the AWS EMF Exporter
to specify which metrics they would like to have sent to CloudWatch with
a 1 second Storage Resolution. The EMF Exporter now explicitly states
the Storage Resolution for each metric as 60 seconds, the previous
implicit default, so there is no behavior change. If the user specifies
a metric to have 1 second resolution it will be sent to CloudWatch EMF
with the Storage Resolution set accordingly.

#### Description
Previously the AWS EMF Exporter sent metric data into CloudWatch without
specifying the storage resolution. CloudWatch would then default to a 60
second storage resolution, even if metrics are sent more frequently than
every 60 seconds. This would confuse users when they try to apply
functions like AVG, SUM, MAX, or MIN to their metrics with a period of 5
seconds. The function would be applied by CloudWatch to 60 seconds worth
of data and produced unexpected results and confusion for the user. This
commit makes this 60 second resolution explicit in the messages sent to
CloudWatch by the EMF Exporter and also gives the user the option to
specify a more granular 1 second resolution per metric in the
configuration file of the AWS EMF Exporter.

#### Link to tracking issue
Fixes open-telemetry#29506 

#### Testing
Added tests to verify that config file parsing validates a metric
descriptor that specifies either a valid unit, valid storage resolution,
or both and rejects other invalid metric descriptors.
Added tests that the translation from metric data to CW EMF carries a
storage resolution with it, defaulting to a value of 60 (current
behavior) if no storage resolution valid is explicitly set in the
configuration.

#### Documentation
Comments added in the code but have not updated the README.md pending
acceptance of the PR.
  • Loading branch information
jpbarto authored and chengchuanpeng committed Jan 26, 2025
1 parent 471ccf2 commit f21abe6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .chloggen/awsemf_storageresolution.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: enhancement

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add support for 1 second metric resolution in CloudWatch Embedded Metrics Format based on metric attributes

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

# (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: [user]

0 comments on commit f21abe6

Please sign in to comment.