How to add and process private custom attributes in elastic-apm-traceparent?

Kibana version:


Elasticsearch version:


APM Server version:


APM Agent language and version:



We hope to implement a requirement to add a private attribute identifier to the existing link identifier elastic-apm-traceparent, while ensuring that the original link trace is normal.

I have observed these methods (, I customize the implementation and replace it, is it possible to implement My purpose?

Do you have any good suggestions, thank you!

@axw Hello, i'm here to disturb you again ...

@EDDYCJY sorry for the late reply, I've been away from computer for the past couple of weeks.

Adding custom attributes to elastic-apm-traceparent is not possible, as that header is meant to conform to the W3C Trace-Context standard.

I think Correlation-Context may address your needs. We don't currently have plans to add this, but that might change.

For now you will need to implement your own middleware to propagate custom attributes.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.