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

Create otelarrow exporter instance per distinct metadata combos #34178

Closed
kristinapathak opened this issue Jul 19, 2024 · 4 comments
Closed

Create otelarrow exporter instance per distinct metadata combos #34178

kristinapathak opened this issue Jul 19, 2024 · 4 comments
Labels
enhancement New feature or request exporter/otelarrow

Comments

@kristinapathak
Copy link
Contributor

kristinapathak commented Jul 19, 2024

Component(s)

exporter/otelarrow

Is your feature request related to a problem? Please describe.

I want to open Arrow streams where specified metadata sent per stream message all match on a per stream basis, similar to configuring metadata_keys in the batch processor.

Describe the solution you'd like

Similar to the batch processor, add the below configuration fields:

metadata_keys (default = empty): When set, this exporter will create one arrow exporter instance per distinct combination of values in the client.Metadata.
metadata_cardinality_limit (default = 1000): When metadata_keys is not empty, this setting limits the number of unique combinations of metadata key values that will be processed over the lifetime of the exporter.

Then, for each unique combination of metadata keys, an arrow exporter object is created. This object creates the number of streams specified by num_streams. The maximum possible number of open streams would be metadata_cardinality_limit * num_streams.

Note: there is nothing arrow exporter specific about this logic. It could be used for any exporter where unique objects are desired per metadata combination.

Describe alternatives you've considered

No response

Additional context

No response

@kristinapathak kristinapathak added enhancement New feature or request needs triage New item requiring triage labels Jul 19, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@jmacd
Copy link
Contributor

jmacd commented Jul 19, 2024

@kristinapathak Thanks for filing! I agree with the stated goal here. While the Arrow components can pass headers on a per-request level, this can present authorization challenges for vendors that would prefer to authorize based on HTTP-level headers.

As you wrote, this sounds like functionality that could be implemented in an exporterhelper module, but there may not be many components that want this. The only reservation I have is that this method will tie us to the legacy style of batching in processor components and will restrict us from using the new exporterhelper-based batching. Ideally, I think we could look for ways to improve exporterhelper to support both batching and exporting by metadata, but that can be a future project. I support adding this functiolnaity directly in the Arrow exporter especially if the logic can be kept mostly separate, which seems natural.

Copy link
Contributor

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Sep 18, 2024
mx-psi pushed a commit that referenced this issue Sep 19, 2024
…etadataKeys (#34827)

**Description:** 

This PR forks
#34235
and adds unit tests.

**Link to tracking Issue:** 

#34178

---------

Co-authored-by: kristina.pathak <kristina.m.pathak@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
@kristinapathak
Copy link
Contributor Author

@jmacd, I think this was fixed in #34827? Can I close this?

@github-actions github-actions bot removed the Stale label Oct 3, 2024
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this issue Oct 4, 2024
…etadataKeys (open-telemetry#34827)

**Description:** 

This PR forks
open-telemetry#34235
and adds unit tests.

**Link to tracking Issue:** 

open-telemetry#34178

---------

Co-authored-by: kristina.pathak <kristina.m.pathak@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter/otelarrow
Projects
None yet
Development

No branches or pull requests

3 participants