-
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
[exporter/awss3] Raw Log Setting #32679
Comments
Pinging code owners:
%s See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I looked at the awss3 exporter code more and think this could be accomplished with a new marshaler. Something maybe like |
You can do that using the encoding config field, https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/awss3exporter/README.md?plain=1#L31 You can use of one of the encoding extensions under extensions/encoding or come up with your own. |
@atoulme that seems to me that none of the encoding extensions have been added to the contrib distribution yet so unfortunately I don't think that will totally get me what I want. I am happy to contribute a new encoder however it doesn't quite seem that encoding is in any distribution yet. |
We can fix that, for sure. Do you want to file issues to make it so? |
When you mean "fix that" are you referring to none of the encoding extensions in the contrib distribution or are you referring to adding a new encoder? |
Both I guess. That said I'm working on making the |
Here, would you like to review #32696 ? |
I have a starting PR here -> #32722 to add some logic into jsonlogencoding extension which I think is the best spot for this |
**Description:** <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> The goal of this PR is to add configuration to the JSON Encoding method to have metadata from resources and attributes in logs and output those into a json attribute. This also will output the body of the log in the `body` attribute. This follows a similar pattern that the AWS Cloudwatch Log Exporter uses but removes any of the AWS specific logic and makes this a more generalized solution **Link to tracking Issue:** <Issue number if applicable> #32679 **Testing:** <Describe what testing was performed and which tests were added.> Unit Tests were added to validate that the output is desired and that the existing logic remains the same. **Documentation:** <Describe the documentation added.> Documentation regarding the usage of the configuration as well as the output to expect is added. --------- Signed-off-by: Blake R <[email protected]>
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 is fixed now 🚀 |
Component(s)
exporter/awss3
Is your feature request related to a problem? Please describe.
In the Amazon Cloudwatch Exporter there is a configuration setting called
raw_log
which will take the OpenTelemetry format and significantly reduce the size of the JSON and do some processing to make logs easily queryable in CloudWatch logs. I'd love to see this be added to the S3 Exporter. When trying to then do an ingestion of the Logs in S3 into a service like OpenSearch the data in S3 is very hard to parse and process leading to pains when trying to query it. If the feature ofraw_log
was enabled for logs exported to S3 this would reduce the burden of engineers having to do transformations in Lambda, ETL jobs or OSI Pipelines.Describe the solution you'd like
I would want the S3 Exporter to have a
raw_log
attribute defaulted tofalse
that when enabled would emit the same logic the CloudWatch Exporter has to turn the logs into a unified struct before doing aPutObject
to the JSON in S3. This should not impact anything on metrics or traces and should only impact logs.Describe alternatives you've considered
There is ETL changes after the data is in S3 or some work that can be done via operators in the log receiver used that could be done in place of this however this solution would be much simpler do in the Exporter.
Additional context
The code the Cloudwatch Log Exporter does when
raw_log
is set to true lives here https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/awscloudwatchlogsexporter/exporter.go#L208-L239The text was updated successfully, but these errors were encountered: