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

feat: stackdriver trace exporter #648

Merged

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Dec 24, 2019

Which problem is this PR solving?

Short description of the changes

  • Implement a stackdriver trace exporter

@dyladan dyladan added the enhancement New feature or request label Dec 24, 2019
@dyladan dyladan added this to the Alpha v0.4 milestone Dec 24, 2019
@dyladan
Copy link
Member Author

dyladan commented Dec 24, 2019

I created this PR as a draft because I still have some open questions:

  1. The opencensus version included a g.co/agent attribute on every trace that had the version of the tracing agent. I ported that, but i'm not sure if we want or need it.
    1. Is this some sort of special key name or just something OC did?
    2. Are there others that should be included?
    3. Should the exporter be adding any attributes at all to the spans, or should this work be done by the SDK?
  2. tests not done
  3. right now number attributes are rounded because GCP only accepts ints. is this acceptable?
  4. attributes that are not number | boolean | string are dropped because stackdriver can't accept other value types

@codecov-io
Copy link

codecov-io commented Dec 24, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@bcded46). Click here to learn what that means.
The diff coverage is 94.55%.

@@            Coverage Diff            @@
##             master     #648   +/-   ##
=========================================
  Coverage          ?   89.97%           
=========================================
  Files             ?      219           
  Lines             ?    10346           
  Branches          ?      945           
=========================================
  Hits              ?     9309           
  Misses            ?     1037           
  Partials          ?        0
Impacted Files Coverage Δ
...ackages/opentelemetry-web/src/WebTracerRegistry.ts 100% <ø> (ø)
...entelemetry-exporter-zipkin/test/transform.test.ts 100% <ø> (ø)
packages/opentelemetry-web/test/WebTracer.test.ts 0% <0%> (ø)
...metry-core/src/trace/instrumentation/BasePlugin.ts 86.84% <100%> (ø)
...ry-plugin-dns/test/functionals/dns-disable.test.ts 100% <100%> (ø)
...opentelemetry-core/src/trace/NoopTracerRegistry.ts 100% <100%> (ø)
...telemetry-plugin-document-load/src/documentLoad.ts 97.95% <100%> (ø)
...lugin-https/test/functionals/https-disable.test.ts 100% <100%> (ø)
packages/opentelemetry-tracing/src/utility.ts 100% <100%> (ø)
...ry-tracing/test/export/ConsoleSpanExporter.test.ts 100% <100%> (ø)
... and 48 more

@dyladan dyladan requested a review from mayurkale22 December 24, 2019 18:35
Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

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

This is a great start, added few initial comments.

@dyladan dyladan marked this pull request as ready for review December 30, 2019 16:18
@dyladan
Copy link
Member Author

dyladan commented Jan 6, 2020

@mayurkale22 is this really xxl with just 20 files changed? How are you differentiating between xl and xxl?

@mayurkale22
Copy link
Member

https://github.com/open-telemetry/opentelemetry-js/labels?utf8=%E2%9C%93&q=size => feel free to suggest or edit the labels or descriptions.

@mayurkale22
Copy link
Member

@draffensperger it would be great, if you can review and approve this one!

Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

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

types and transform functions they are almost the same as for ExporterCollector. Seems like this is the same functionality with regards to types and data manipulation. Maybe it should be reused or extended, otherwise I see many duplications here.

@dyladan
Copy link
Member Author

dyladan commented Jan 8, 2020

types and transform functions they are almost the same as for ExporterCollector. Seems like this is the same functionality with regards to types and data manipulation. Maybe it should be reused or extended, otherwise I see many duplications here.

This is because the types for the collector exporter came from opencensus which in turn got its types from stackdriver because they are both google projects. We have to keep them separate because while they are very similar, they are different projects.

@obecny
Copy link
Member

obecny commented Jan 8, 2020

Are you able to add some screenshots to be able to see how the stackdriver spans looks like ?

@dyladan
Copy link
Member Author

dyladan commented Jan 8, 2020

I don't have time to do it today. if @mayurkale22 merges this while i'm on vacation I can add it in a separate PR

Copy link
Contributor

@draffensperger draffensperger left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for making it infer the project ID from the credentials when not specified. Had just a few minor suggestions about making it a bit clearer in the dos that service accounts aren't needed when running on GCP. Other than that, looks good!

@mayurkale22 mayurkale22 removed the needs-more-reviewers PRs with this label are ready for review and needs more people to review to move forward. label Jan 8, 2020
@mayurkale22
Copy link
Member

@dyladan Could you please resolve the last round of comments, I think it is good to go after that.

@dyladan
Copy link
Member Author

dyladan commented Jan 14, 2020

@dyladan Could you please resolve the last round of comments, I think it is good to go after that.

yes i'll do that today. i've been spending a lot of time on the named tracers spec recently and this got lost in the shuffle

@dyladan
Copy link
Member Author

dyladan commented Jan 14, 2020

@mayurkale22 seems like this is probably good to go now whenever you're ready

@mayurkale22 mayurkale22 added the Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) label Jan 15, 2020
@obecny
Copy link
Member

obecny commented Jan 16, 2020

I don't have time to do it today. if @mayurkale22 merges this while i'm on vacation I can add it in a separate PR

ping on that

@dyladan
Copy link
Member Author

dyladan commented Jan 16, 2020

@obecny done

@mayurkale22 mayurkale22 merged commit 82828b7 into open-telemetry:master Jan 16, 2020
@dyladan dyladan deleted the stackdriver-trace branch January 16, 2020 21:33
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants