-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
scope -> name missing in cloudwatch logs exporter #29884
Comments
I have the same problem |
Pinging code owners for exporter/awscloudwatchlogs: @boostchicken @bryan-aguilar @rapphil. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hello @MaGaudin, I was able to confirm your findings and agree the scope and scope name should be included in the log being sent to CloudWatch. Code owners can correct me if there's a specific reason this should not be included. Solution proposal: The exporter is essentially copying all data it wants to send into a local struct called I believe the solution here is to modify the function signature to accept
We can get Scope from sl.Scope here:
cwLogBody would also need to be modified to introduce scope here:
Then the scope information could just be added here alongside resource :
Note: |
One thing to note: My proposed solution will not work when the configuration option |
Thank you so much for the propose solution @crobert-1! So, we need to wait for an opinion from the code owners? |
You're welcome to post a PR with the change. Otherwise, yes, you'll need to wait for code owners or other contributors to provide a fix. |
Thank you for your investigation @crobert-1, it was very thorough and helpful. I agree with everything that has been said so far. I believe it would make sense for the InstrumentationScope to be included.
raw_log should really be looked through as a
Agreed, this would be nice if it could fit nicely into the existing CWL logic, but I do not think and would not suggest for whoever takes on this PR to tackle this now. I would request a separate PR. |
Hi @bryan-aguilar thanks for your feedback. How could we request for a separate PR? is there any possibility to unblock this feature? |
I was suggesting to have separate PRs for the instrumentation scope pr and new, consistent marshaling behavior. This PR is not blocked and awaiting for a contributor to pick up the work. |
…udwatchlogs exporter (#30316) **Description:** Include the instrumentation scope in the log records exported by the cloudwatchlogs expoter **Link to tracking Issue:** #29884 **Testing:** Unit tests were added. --------- Signed-off-by: Raphael Silva <rapphil@gmail.com> Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
…udwatchlogs exporter (open-telemetry#30316) **Description:** Include the instrumentation scope in the log records exported by the cloudwatchlogs expoter **Link to tracking Issue:** open-telemetry#29884 **Testing:** Unit tests were added. --------- Signed-off-by: Raphael Silva <rapphil@gmail.com> Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Component(s)
No response
What happened?
Description
Our ADOT Collector is receiving this log:
{
"resourceLogs": [
{
"resource": {
"attributes": [...]
},
"scopeLogs": [
{
"scope": {
"name": "xxxxxxx"
},
"logRecords": [
{
"timeUnixNano": "xxx",
"observedTimeUnixNano": "xxxx",
"severityNumber": 9,
"severityText": "Information",
"body": {
"stringValue": "GET / \r\n"
},
"attributes": [...],
"traceId": "xxxx",
"spanId": "xxxx"
}
]
}
]
}
]
}
but in AWS Cloudwatch we are not able to see the field scope.name. We saw from the file exporter.go (https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/awscloudwatchlogsexporter/exporter.go) that is missing the logic to retrieve the field from line 143-146.
Steps to Reproduce
Expected Result
We would like to have this field in our cloudwatch logs.
Actual Result
this field is missing
Collector version
v0.90.1 for OTEL and v0.36.0 for ADOT
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
The text was updated successfully, but these errors were encountered: