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

Expose API to get/set tracing headers for custom transactions #468

Open
vigneshshanmugam opened this issue Oct 25, 2019 · 7 comments
Open
Milestone

Comments

@vigneshshanmugam
Copy link
Member

vigneshshanmugam commented Oct 25, 2019

  • When users create custom transactions and instrument XHR calls manually instead of the managed transactions, we would need to expose this method
    injectDtHeader(span, target) {
    const headerName = this._configService.get('distributedTracingHeaderName')
    const headerValue = getDtHeaderValue(span)
    const isHeaderValid = isDtHeaderValid(headerValue)
    if (isHeaderValid && headerValue && headerName) {
    setRequestHeader(target, headerName, headerValue)
    }
    }
    which sets the trace headers to the current outgoing request (fetch/xhr).

More details

@paulb-elastic
Copy link

In the interests of transparency, we’ve discussed this in refinement and we won’t be able to work on this or plan it in right now, whilst the team are focusing on Synthetics.

@sebastiendan
Copy link

What's the status of this two years later? I'm looking for a way to manually pass traceparent as header of a frontend->server request within a custom transaction.

@sebastiendan
Copy link

Taking inspiration from here and from the traceparent values I was getting with auto-instrumentation, I successfully tested manually setting the traceparent to 00-${span.traceId}-${span.id}-01, with "00" and "01" being the unknown (to me) "version" and "tag" respectively.

Will we get an exposed function to get the right value from the transaction/span?

@sebastiendan
Copy link

@vigneshshanmugam Any chance you can share any updates on this?

@axelv
Copy link

axelv commented Jan 30, 2024

This is an important feature for us!

Since we're forced to use custom transactions to capture concurrent traces, it's the only way to have distributed tracing.

@pgayvallet
Copy link

Any progress on this? this is still a requierement for elastic/kibana#102625

@gjelenc
Copy link

gjelenc commented Jul 10, 2024

Also, I'm wondering for progress ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants