opensearch-project / opensearch-project/data-prepper

Adding custom items to service-map traces

Open
#2,941 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.