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

Make internal fields on DistributedTracingData public #2388

Open
monty241 opened this issue Jul 1, 2024 · 0 comments
Open

Make internal fields on DistributedTracingData public #2388

monty241 opened this issue Jul 1, 2024 · 0 comments
Labels

Comments

@monty241
Copy link

monty241 commented Jul 1, 2024

When self-handling traceparent, the use case we came across is the need to compare the transaction settings in Agent.Tracer.CurrentTransaction with the value of the traceparent HTTP header. The traceparent can be deserialized (and checked) using TryDeserializeFromString, but the members are internal only.

The use case is to use a generic class (filter) to more complex logic whether to create a new transaction when running distributed or hook on to the current transaction. Remember when service names are different, a new transaction can be attached to the parent span, whereas with equal service names this is not possible.

It would make it easier to compare TraceId, ParentId and TraceState between the current transaction and traceparent using the deserialized version acquired as an instance of DistributedTracingData when these fields would be readonly public.

Workaround is compare the string of traceparent and assume validity when TryDeserializeFromString returns a non null value.

@monty241 monty241 added the enhancement New feature or request label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant