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
Add support for 1-second Storage Resolution in the AWS EMF Exporter (#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#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.
Copy file name to clipboardExpand all lines: exporter/awsemfexporter/README.md
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,14 @@ This exporter follows default credential resolution for the
85
85
Follow the [guidelines](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) for the
86
86
credential configuration.
87
87
88
+
## Metric Attributes
89
+
By setting attributes on your metrics you can change how individual metrics are sent to CloudWatch. Attributes can be set in code or using components like the [Attribute Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/attributesprocessor).
90
+
91
+
The AWS EMF Exporter will interpret the following metric attributes to change how it publishes metrics to CloudWatch:
|`aws.emf.storage_resolution`| This attribute should be set to an integer value of `1` or `60`. When sending the metric value to CloudWatch use the specified storage resolution value. CloudWatch currently supports a storage resolution of `1` or `60` to indicate 1 second or 60 second resolution. |`aws.emf.storage_resolution = 60`|
0 commit comments