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

Add better explanation for how to configure extension classes #8898

Merged
merged 4 commits into from
Jul 20, 2023

Conversation

tylerbenson
Copy link
Member

It was not obvious how to apply some of the examples listed in the readme. Added some config that is available without a customizer, but also linked to the demo customizer since that was missing before.

It was not obvious how to apply some of the examples listed in the readme.  Added some config that is available without a customizer, but also linked to the demo customizer since that was missing before.
@tylerbenson tylerbenson requested a review from a team as a code owner July 7, 2023 17:49
@github-actions github-actions bot requested a review from theletterf July 7, 2023 17:49

| System property | Environment variable | Value |
|----------------------|----------------------|----------------------------------------|
| otel.traces.exporter | OTEL_TRACES_EXPORTER | com.example.javaagent.DemoSpanExporter |
Copy link
Contributor

Choose a reason for hiding this comment

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

did you verify that these values would work or did you just guess that these values should work?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't verify... sorry.
Perhaps they could be added to the unit tests somehow?

Copy link
Member

Choose a reason for hiding this comment

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

the extension project has tests already, can you check those?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should verify whether these work. I'd assume that otel.propagators uses the name from the provider

As the DemoSpanExporter doesn't have a provider at probably can't be configured this way.

Copy link
Member Author

Choose a reason for hiding this comment

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

After further consideration, I opted to remove the settings table and only document the customizer since that allows better encapsulation within the extension.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've updated the explanation per @mateuszrzeszutek's feedback. I've also verified that the otel.propagators setting is used in the unit tests so I referenced that one specifically where the others are applied dynamically.

This keeps the customization encapsulated within the extension.
Copy link
Member

@theletterf theletterf left a comment

Choose a reason for hiding this comment

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

Just a nit.

examples/extension/README.md Outdated Show resolved Hide resolved
Also add better formatting for links to demo classes.
@trask trask enabled auto-merge (squash) July 20, 2023 05:14
@trask trask merged commit f52ce2c into open-telemetry:main Jul 20, 2023
44 checks passed
@tylerbenson tylerbenson deleted the tyler/extension-config branch July 20, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants