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

Update docs to rely more on environment variable configuration #874

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

ahayworth
Copy link
Contributor

This PR updates our documentation in a few ways:

  • Replaces some outdated configuration examples referencing a tracer factory
  • Cleans up a reference to a non-existent LMDB example
  • Sets the console span exporter for all current instrumentation examples
  • Updates docs to reflect how to configure things via the environment whenever possible or reasonable.

Note that this means our examples may not flush to the console since the
BatchSpanProcessor is selected by default. I think this is okay,
honestly, but if it comes up we could figure out a way to select the
SimpleSpanProcessor (as some examples were doing) via the environment.

Fixes #872

This PR updates our documentation in a few ways:
- Replaces some outdated configuration examples referencing a tracer factory
- Cleans up a reference to a non-existent LMDB example
- Sets the console span exporter for all current instrumentation examples
- Updates docs to reflect how to configure things via the environment whenever possible or reasonable.

Note that this means our examples may not flush to the console since the
BatchSpanProcessor is selected by default. I think this is okay,
honestly, but if it comes up we could figure out a way to select the
SimpleSpanProcessor (as some examples were doing) via the environment.

Fixes open-telemetry#872
@fbogsany
Copy link
Contributor

Note that this means our examples may not flush to the console since the
BatchSpanProcessor is selected by default. I think this is okay,
honestly, but if it comes up we could figure out a way to select the
SimpleSpanProcessor (as some examples were doing) via the environment.

The console exporter (when set via the environment variable) is wrapped in a SimpleSpanProcessor rather than a BSP:

when 'console' then Trace::Export::SimpleSpanProcessor.new(Trace::Export::ConsoleSpanExporter.new)

Copy link
Contributor

@fbogsany fbogsany left a comment

Choose a reason for hiding this comment

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

Beautiful cleanup, thank you!

@fbogsany fbogsany merged commit f0738fa into open-telemetry:main Jul 14, 2021
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.

Ensure documentation and examples reference configuration via ENV
2 participants