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

example/basic: make basic example work #279

Merged
merged 3 commits into from
Nov 4, 2019

Conversation

clsung
Copy link
Contributor

@clsung clsung commented Nov 2, 2019

  • use stdout as exportor (otherwise no output when you run it)

- use stdout as exportor (otherwise no output when you run it)
Copy link
Contributor

@rghetia rghetia left a comment

Choose a reason for hiding this comment

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

one minor nit. Otherwise LGTM.

func main() {
initTracer()
tracer := global.TraceProvider().GetTracer("ex.com/basic")
meter := global.MeterProvider().GetMeter("ex.com/basic") // TODO: should share resources ^^^?
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a note that Meter doesn't work yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just rephrase TODO, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI there is a Meter stdout exporter in #265, which also adds to this example.
It's fine to remove the note about flush.

@jmacd
Copy link
Contributor

jmacd commented Nov 4, 2019

For me, the TODO about resources is a spec-level "nice-to-have". It should be relatively easy to add resources to the meter and tracer in a coordinated way, but we haven't specified a way to do that. I believe the right approach would be to combine the two interfaces and support a common method for adding resources to a Tracer/Meter combo.

@rghetia rghetia merged commit 6b48fce into open-telemetry:master Nov 4, 2019
@clsung clsung deleted the example_basic branch November 6, 2019 00:30
@pellared pellared added this to the untracked milestone Nov 8, 2024
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.

4 participants