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

Include parent span in Jaeger thrift export #1836

Closed

Conversation

codeboten
Copy link
Contributor

Description

Follow up to #1809 to add the same logic to the thrift exporter

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been updated
  • Documentation has been updated

@codeboten codeboten requested review from srikanthccv, a team and lzchen and removed request for a team May 10, 2021 20:49
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

I don't think this is needed for thrift because unlike proto thrift has parentSpanId as a top level attribute.

parent_id = span.parent.span_id if span.parent else 0
tags = self._extract_tags(span)
refs = self._extract_refs(span)
logs = self._extract_logs(span)
flags = int(ctx.trace_flags)
jaeger_span = TCollector.Span(
traceIdHigh=_get_trace_id_high(trace_id),
traceIdLow=_get_trace_id_low(trace_id),
spanId=_convert_int_to_i64(span_id),
operationName=span.name,
startTime=start_time_us,
duration=duration_us,
tags=tags,
logs=logs,
references=refs,
flags=flags,
parentSpanId=_convert_int_to_i64(parent_id),
. See this https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk_exporters/jaeger.md#summary and this https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk_exporters/jaeger.md#parent-id

@codeboten
Copy link
Contributor Author

Ah good catch, thanks @lonewolf3739

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