opensearch-project / opensearch-project/data-prepper
Adding custom items to service-map traces
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 374
- Forks
- 355
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
Traces coming from the otel-trace-pipeline and forwarded to the service-map-pipeline don't propagate some items. It could be a great improvement if custom items could be added in the service-map-pipeline.
Describe the solution you'd like
The trace I recieve at the moment from the service-map-pipeline is the following:
{
"_index" : "otel-v1-apm-service-map",
"_type" : "_doc",
"_id" : "4tvYCIifyVbGYfH/9iaP/g==",
"_score" : 1.0,
"_source" : {
"serviceName" : "order",
"kind" : "SPAN_KIND_INTERNAL",
"destination" : {
"resource" : "prepareOrderManifest",
"domain" : "inventory"
},
"target" : null,
"traceGroupName" : "createOrder",
"hashId" : "4tvYCIifyVbGYfH/9iaP/g=="
}
}
This trace should be manipulated such that a "tenant" item is added. "tenant" is already available as a resource attribute within the trace in the otel-trace-pipeline :
{
"_index" : "otel-v1-apm-service-map",
"_type" : "_doc",
"_id" : "4tvYCIifyVbGYfH/9iaP/g==",
"_score" : 1.0,
"_source" : {
"serviceName" : "order",
"kind" : "SPAN_KIND_INTERNAL",
"destination" : {
"resource" : "prepareOrderManifest",
"domain" : "inventory"
},
"target" : null,
"traceGroupName" : "createOrder",
"hashId" : "4tvYCIifyVbGYfH/9iaP/g==",
"tenant" : "test1"
}
}
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how data moves from the otel-trace-pipeline into the service-map-pipeline and where resource attributes are selected for the service-map output. Use the supplied examples to determine how a custom item such as tenant should be configured or propagated, and consider the work complete when the resulting service-map trace includes it without losing existing fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100