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

module/apmot: initial tracer implementation #173

Merged
merged 2 commits into from
Aug 8, 2018

Conversation

axw
Copy link
Member

@axw axw commented Aug 8, 2018

Implement an OpenTracing tracer on top of the
core API. Root spans create transactions, and
child spans create spans or transactions,
depending on whether or not the parent is
remote.

Neither baggage nor logging are supported,
nor is the binary propagation format. We use
the (draft) W3C Trace-Context, for which there
is not yet a binary format.

There is a bug in the span context which we
cannot fix until spans are top-level objects,
which will happen with the v2 API. We will
revisit this when the v2 API is supported. The
bug is unlikely to affect anyone, since it will
only occur if you attempt to use span context
after the span has been finished/ended.

In line with the Elastic APM Java agent's
implementation, we support several custom tags:

  • type (transaction or span type)
  • user.id, user.email, user.username (transaction user context)
  • result (transaction result)

@codecov-io
Copy link

codecov-io commented Aug 8, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #173   +/-   ##
=========================================
  Coverage          ?   75.22%           
=========================================
  Files             ?       86           
  Lines             ?     5345           
  Branches          ?        0           
=========================================
  Hits              ?     4021           
  Misses            ?     1131           
  Partials          ?      193
Impacted Files Coverage Δ
module/apmhttp/traceheaders.go 84.21% <ø> (ø)
module/apmot/context.go 100% <100%> (ø)
module/apmhttp/handler.go 72.5% <100%> (ø)
module/apmhttp/client.go 73.91% <50%> (ø)
module/apmot/tracer.go 83.33% <83.33%> (ø)
module/apmot/span.go 87.74% <87.74%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bb918e...15a6cfb. Read the comment docs.

Implement an OpenTracing tracer on top of the
core API. Root spans create transactions, and
child spans create spans or transactions,
depending on whether or not the parent is
remote.

There is a bug in the span context which we
cannot fix until spans are top-level objects,
which will happen with the v2 API. We will
revisit this when the v2 API is supported.

Neither baggage nor logging are supported,
nor is the binary propagation format. We use
the (draft) W3C Trace-Context, for which there
is not yet a binary format.

In line with the Elastic APM Java agent's
implementation, we support several custom tags:

  - type (transaction or span type)
  - user.id, user.email, user.username
    (transaction user context)
  - result (transaction result)
@axw axw force-pushed the opentracing-bridge branch from 8175abc to 15a6cfb Compare August 8, 2018 10:25
@axw axw merged commit 28b2cf7 into elastic:master Aug 8, 2018
@axw axw deleted the opentracing-bridge branch August 8, 2018 11:35
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.

2 participants