Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Jay Narale
@blacktrident
Austin Parker
@austinlparker
it’s an implementation of opentracing-go for jaeger. if you wanted to send traces to jaeger, you’d need to use that library in addition to the opentracing-go api package
Jay Narale
@blacktrident
Ohh I see, @austinlparker Thanks !
Austin Parker
@austinlparker
similar packages exist for other tracing systems - here’s lightstep’s go tracer, for example
Jay Narale
@blacktrident
Cool thanks !
Jay Narale
@blacktrident
I understood thanks!
seedChen
@seedChen
Hi all, I got my own tracing analysis systems in my team and recently worked on code refactoring refer to opentracing api (include cpp, go, java and nodejs), during which a few questions confused me.
  • Apis among these programming languages are not exactly the same, even for simple ones. For example, GetTracer exists in go and cpp but not in java, and everyone gets a forEachBaggageItems execept nodejs.
  • Lack of Getters. Getters like GetTag, GetTraceId and GetSpanId are sometimes very useful, e. g. we want to bind trace_id and span_id with user-specified resources like local logs, or just print them for debug. And sometimes we do need to get tags out after SetTag.
    Are the points above designed on purpose or just some mistakes? Can someone help me? Thanks a lot.
seedChen
@seedChen
another point in opentracing-java. Parameters in TextMapInject and TextMapExtract are defined as Map<String, String>, causing some problems on usage, performance and serialization/deserialization. Better Map<String,Object> instead?
Jay Narale
@blacktrident
If I use the basictracer-go for a new framework endpoint which implements Open tracing API as I don't want to use Open Tracing API directly into my project,There won't be any problems right?
seedChen
@seedChen
Anybody help?
bogiva
@bogiva
Would there be an example of how to define OpenTracing support in an API modeled in Swagger/OpenAPI format (e.g. defining Trace-Context HTTP header parameters)?
libnoon
@libnoon
Hi there! FYI I'm working to integrate Opentracing-Python into Debian: https://salsa.debian.org/python-team/modules/opentracing-python
Joe
@nimbusscale
I'm looking to adopt OpenTracing for several of our internal services and I had a question I was hoping to get some guidance on. Our clients for our internal services set an x-request-id header when they submit requests. I'm trying to understand if there are any considerations for correlating that id with a trace or span id? Would it make sense to make it a tag, if so I don't see any relevent tag in the Semantic Conventions. Thanks in advance for any guidance that can be provided.
Yuri Shkuro
@yurishkuro
@nimbusscale since this is a custom id, there's no semantic convention for it today. Yes, you can record it as a tag.
Joe
@nimbusscale
@yurishkuro Thanks!
Balázs Kossovics
@kosii
Hey! Are the Java docs outdated? I cannot find tracer.buildSpan("foo").startActive(false) method in 0.33.0
There is only start()
Carlos Alberto Cortez
@carlosalberto
@kosii They are not ;) we removed startActive() (which was deprecated in 0.32), as it was causing a few issues
bono007
@bono007
What are the plans for java-spring-cloud support for Spring Cloud Hoxton (Boot 2.2.1)? Has anyone run against it? I am doing so against RC2 (GA is not yet available for Hoxton but its soon). So far looks good. I do see a few warn/errors but am just starting to dig through them. Just wanted to touch base here before I do though.
Balázs Kossovics
@kosii
@carlosalberto oh, thanks.
Btw tracer.activateSpan and tracer.scopeManager().activate does the same thing?
Carlos Alberto Cortez
@carlosalberto
@kosii yes, they do (tracer.activateSpan() is a shortcut for the other one ;) )
Nijin
@nijin87
HI team, is any option to track mongodb traces using opentracing ? (Jaeger and java spring boot application)
motobeats
@motobeats
Using opentracing-spring-jaeger-cloud-starter to automatically trace restTemplate calls and JDBC traffic for a Quartz job. Was trying to aggregate all the spans into an overall transaction span by using Span span = GlobalTracer.get().buildSpan("quartzJob").start() when kicking off the job but this returns an individual span as well. Anyway to mix manual span creation in with auto generated ones?
motobeats
@motobeats
Nevermind. This works now Scope scope = GlobalTracer.get().scopeManager().activate(span, false) although I don't really understand why. Is the pattern to start a span then register it with the scope manager such that downstream methods know it is active and thus can be children?
kmrgrv96
@kmrgrv96
Can anyone point me to a c++ implementation of jeagertracing
Holden Lewis
@hplewis
Hey :) Having an issue with Span deactivation on a netty thread. Looks like the scopemanager utilizes threadlocal, but from what I can tell, the activation on my span happens on a different thread than my deactivation, causing it to never be deactivated. Anyone know if this is a known issue or am if I'm missing something here? thanks!
As an overview, we're using reactor for our incoming (and outgoing) requests, which then call graphql execution. im trying to make my span in a graphql instrumentation. span starts before execution and finishes after execution
Carlos Alberto Cortez
@carlosalberto
@hplewis that is correct - activation and deactivation needs to happen in the same thread. Are you using some existing instrumentation, or writing your own? If you have a more detailed scenario/sample, we could take a look.
Holden Lewis
@hplewis
Writing my own instrumentation. I'll send an example. One sec
Holden Lewis
@hplewis
here's a simple version of my issue: https://pastebin.com/iR3bQt0k
when I do this, the span will finish, but never be deactivated. and so each subsequent call gets nested further and further in the trace
presumably because the thread changes between the code in beginExecution and the code called in onCompleted
Carlos Alberto Cortez
@carlosalberto
Oooh I see
So basically Scope is not intended to passed between threads (that's why in the last version we even removed Scope.span() )
You'd have:
public InstrumentationContext<ExecutionResult> beginExecution() {
  Span span = ...;
  return new SimpleInstrumentationContext<ExecutionResult>() {
      @Override
      public void onCompleted(ExecutionResult result, Throwable t) {
         if (t != null) {
           span.setTag(Tags.ERROR, true);
         }
         span.finish();
      }
    };
}
Carlos Alberto Cortez
@carlosalberto
You can still activate() the Span from beginExecution() if you need to, but you will need to close it before the method is finished ;)
Holden Lewis
@hplewis
ah i dont actually have control over that part. this instrumentation function is called by graphql execution, sadly
im just writing this hook via the interface they provide
Carlos Alberto Cortez
@carlosalberto
Gotcha - in that case, don't pass around a Scope, only a Span
Holden Lewis
@hplewis
would i be able to activate it still? or would i have to have the span run unactivated?
Carlos Alberto Cortez
@carlosalberto
Yes, you could still activate it within onCompleted() (specially useful if you are tracing any cleanup task being done there ;) )
i.e.
Holden Lewis
@hplewis
but not starting in beginexecution and finishing in oncomplete?
Carlos Alberto Cortez
@carlosalberto
      public void onCompleted(ExecutionResult result, Throwable t) {
         try (Scope scope = GlobalTracer.get().activateSpan(span)) {
         } finally {
            span.finish();
         }
Holden Lewis
@hplewis
i see. damn haha
thanks for the help :)
Carlos Alberto Cortez
@carlosalberto
Correct, you cannot start the activateSpan() part in beginExecution() and finish it in onComplete() - you can do activation on each one though, separately
no worries :)