-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[exporter/awsemf] Move CloudWatch Metric Stats Attribute to the bottom of EMF Logs entries #26697
Labels
Comments
mxiamxia
added
bug
Something isn't working
needs triage
New item requiring triage
labels
Sep 14, 2023
Pinging code owners for exporter/awsemf: @Aneurysm9 @shaochengwang @mxiamxia. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
mxiamxia
changed the title
[exporter/awsemf] Make Metric attribute KV pair always present on the top EMF Logs entries
[exporter/awsemf] Move CloudWatch Metric Stats Attribute to the bottom of EMF Logs entries
Sep 18, 2023
Aneurysm9
added
enhancement
New feature or request
comp:aws
AWS components
and removed
bug
Something isn't working
needs triage
New item requiring triage
labels
Sep 21, 2023
vastin
added a commit
to vastin/opentelemetry-collector-contrib
that referenced
this issue
Oct 6, 2023
**Tracking Issues:** open-telemetry#26697
lisguo
pushed a commit
to amazon-contributing/opentelemetry-collector-contrib
that referenced
this issue
Oct 12, 2023
**Tracking Issues:** open-telemetry#26697
lisguo
pushed a commit
to lisguo/opentelemetry-collector-contrib
that referenced
this issue
Oct 20, 2023
jj22ee
pushed a commit
to jj22ee/opentelemetry-collector-contrib
that referenced
this issue
May 10, 2024
jj22ee
pushed a commit
to jj22ee/opentelemetry-collector-contrib
that referenced
this issue
May 11, 2024
jj22ee
pushed a commit
to jj22ee/opentelemetry-collector-contrib
that referenced
this issue
May 11, 2024
**Tracking Issues:** open-telemetry#26697
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component(s)
exporter/awsemf
What happened?
Description
Cloudwatch metrics are being formatted and sent to AWS CW in EMF logs, however the metrics attributes today are being presented in a random order[code] in the log entries. For Cloudwatch customers, they can use
LogsInsight
to query these EMF logs but LogsInsights has the limitation that it can only scan maximumly 200 the event fields in a single Json Log entry. We've seen the EMF Log entries which have exceeded these 200 event fields limits when it includes the histogram bucket items(see atttachedLatency
MetricStats example) in EMF logs. CW Logs count each individual value in bucket as a single event fields. So we can easily reach the limit if there is a large bucket size included. We can't recommend our customers to reduce the bucket size during Instrumentation as it will reduce the accuracy of histogram metric used for their observability.To mitigate this problem, we propose to put the Histogram MetricStats(Latency attribute as example) to the bottom of the EMF logs entries. So CW LogsInsight query will always be able to scan valuable data(Eg, metric dimensions) for the queries before reaching the event fields limit. This will require we change serialization implementation for PutLogsEvent API in EMFExporter.
Steps to Reproduce
n/a
Expected Result
Actual Result
The current EMF logs attribute order
Collector version
v0.85
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
{
"EKS.Cluster": "petclinic-sampleApp",
"Error": {
"Values": [
0
],
"Counts": [
1
],
"Max": 0,
"Min": 0,
"Count": 1,
"Sum": 0
},
"Fault": {
"Values": [
0
],
"Counts": [
1
],
"Max": 0,
"Min": 0,
"Count": 1,
"Sum": 0
},
"K8s.Namespace": "default",
"K8s.Node": "i-0102cd843cb286120",
"K8s.Pod": "customers-service-b8699b487-4ltgk",
"K8s.Workload": "customers-service",
"Latency": {
"Values": [
7.180520493565249,
7.498429295612942,
8.177095129709611,
8.53912606037064,
9.311982999037598,
9.724259708304764,
10.154789466897915,
10.604380406351545,
11.073876437239882,
12.076147885389684,
13.752179963522824,
14.996858591225857,
16.354190259419195,
17.834370939375464,
19.448519416609493,
28.72208197426089,
421.41224479444895,
479.89947491922317
],
"Counts": [
3,
3,
1,
3,
1,
2,
2,
1,
2,
1,
2,
1,
1,
1,
1,
1,
1,
1
], "Max": 640.013708,
"Min": 640.013708,
"Count": 1,
"Sum": 640.013708
},
"OTelLib": "AwsSpanMetricsProcessor",
"Operation": "GET /owners",
"Service": "customers-service",
"Version": "1",
"_aws": {
"CloudWatchMetrics": [
{
...
],
"Timestamp": 1694724655040
},
"aws.span.kind": "SERVER"
}
The text was updated successfully, but these errors were encountered: