Skip to content

How to emit traces for two services from a single java application with manual instrumentation? #5223

Answered by MacNale
MacNale asked this question in Q&A
Discussion options

You must be logged in to vote

SpanData mySpanData = MySpanData.builder()
.spanId(myspanId)
.spanContext(myspancontext)
.transaction(transaction).build();

Collection spanData = new ArrayList();
spanData.add(mySpanData);

OtlpGrpcSpanExporter exporter = OtlpGrpcSpanExporter.builder()
.setEndpoint("your-endpoint-url")
.build();

exporter.export(spanData);

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
9 replies
@MacNale
Comment options

@jkwatson
Comment options

@MacNale
Comment options

@jkwatson
Comment options

@MacNale
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MacNale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants