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

ext/jaeger: fix example #262

Conversation

mauriciovasquezbernal
Copy link
Member

The example of the jaeger exporter is failing because
e4d8949 ("OpenTracing Bridge - Initial implementation (#211)") introduced
a new timestamp parameter to add_event, the example was passing parameter by
position so it was messed up.

I tried to add this to the CI but didn't find an easy way to do it, if somebody has a suggestion it's welcome!

The example of the jaeger exporter is failing because
e4d8949 ("OpenTracing Bridge - Initial implementation (open-telemetry#211)") introduced
a new timestamp parameter to add_event, the example was passing parameter by
position so it was messed up.
@Oberon00
Copy link
Member

Oberon00 commented Nov 4, 2019

Good catch!

Actually, I think that change in #211 was a mistake: the timestamp should be added to the end of the argument list, as using a timestamp should be a nonstandard use case and not encouraged. On the other hand, I imagine event attributes are quite common.

I'd prefer to fix this in add_event's definition.

That could be catched in CI if we had mypy checks for that example 😉 (although #201 seems to show that mypy checks are not really feasible everywhere)

@@ -31,8 +31,8 @@
# create some spans for testing
with tracer.start_as_current_span("foo") as foo:
time.sleep(0.1)
foo.set_attribute("my_atribbute", True)
foo.add_event("event in foo", {"name": "foo1"})
foo.set_attribute("my_attribute", True)
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@c24t c24t left a comment

Choose a reason for hiding this comment

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

Either solution LGTM, but I agree with @Oberon00 that it makes sense to change the arg order. FWIW that's also the argument order that @carlosalberto picked in java.

@mauriciovasquezbernal
Copy link
Member Author

I'll update this PR/open a new one changing the order of the arguments.

@mauriciovasquezbernal
Copy link
Member Author

I just opened a PR with the new approach #270, when that is merged we can close this one.

@c24t
Copy link
Member

c24t commented Nov 6, 2019

Closing this one in favor of #270

@c24t c24t closed this Nov 6, 2019
@mauriciovasquezbernal mauriciovasquezbernal deleted the mauricio/fix_jaeger_exporter_example branch April 14, 2020 21:52
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 2020
closes open-telemetry#165

Signed-off-by: Olivier Albertini <olivier.albertini@montreal.ca>
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.

3 participants