Skip to content
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] use encoding extensions #31801

Merged
merged 1 commit into from Mar 18, 2024

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Mar 18, 2024

Description:
Add encoding extension support to AWS S3 exporter.

Link to tracking Issue:
Fixes #30554

Testing:
Unit tests.

Documentation:
README.

@MovieStoreGuy MovieStoreGuy merged commit cbf003e into open-telemetry:main Mar 18, 2024
142 checks passed
@atoulme atoulme deleted the add_encoding_s3exporter branch March 18, 2024 06:21
@github-actions github-actions bot added this to the next release milestone Mar 18, 2024
marshaler.logsMarshaler, _ = e.(plog.Marshaler)
marshaler.metricsMarshaler, _ = e.(pmetric.Marshaler)
marshaler.tracesMarshaler, _ = e.(ptrace.Marshaler)
marshaler.fileFormat = encoding.String()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atoulme - what's the expected behaviour here, is this intended to be the ID as defined in the config file?

extension:
   textencoding: # <- fileFormat == "" ?
   textencoding/myspecialtextencoding: # <- fileFormat == "myspecialtextencoding"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole ID: textencoding/myspecialtextencoding

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you'd end up with an object key of something like:
mytrace/year=2024/month=03/day=18/hour=12/minute=02/myprefixtrace_12345.textencoding/myspecialtextencoding

(where keyprefix=mytrace, prefix=myprefix and metadata=trace)

thats not the prettiest key and there's a possibility that you could have problems with allowed characters or length (unlikely).
Might it be better to do one of the following:

  • allow specifying the extension as part of the exporter config
  • leave it empty
  • modify the encoding extension interface to add a function to return the extension to use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this. 1 and 2 seem like the right idea to me, with the extension by default being an empty string. Do you want to file an issue to follow up?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've raised #31818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[exporter/awss3] Move encodings to extensions
4 participants