Skip to content

Add otel-apm-service-map processor#6479

Merged
dlvenable merged 9 commits intoopensearch-project:mainfrom
kkondaka:apm-sm-processor
Feb 17, 2026
Merged

Add otel-apm-service-map processor#6479
dlvenable merged 9 commits intoopensearch-project:mainfrom
kkondaka:apm-sm-processor

Conversation

@kkondaka
Copy link
Copy Markdown
Collaborator

@kkondaka kkondaka commented Feb 2, 2026

Description

The otel_apm_service_map processor analyzes OpenTelemetry trace spans to automatically generate Application Performance Monitoring (APM) service map relationships and metrics. It creates structured events that can be visualized as service topology graphs, showing how services communicate with each other and their performance characteristics.

Issues Resolved

Resolves #6482

Check List

  • [X ] New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • [ X] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Copy Markdown
Collaborator

@KarstenSchnitter KarstenSchnitter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just started reviewing this PR. I am not quite getting the entire goal of the change, yet. But I found an issue with the maps used in the OtelApmServiceMapProcessor. You should not use byte arrays as map keys, as the comparisons do not work properly (they are compared using references not the array values). See, e.g., https://www.baeldung.com/java-map-key-byte-array for an explanation.


final Map<MetricKey, MetricAggregationState> metricsStateByKey = new HashMap<>();

final Map<byte[], Collection<SpanStateData>> previousSpansByTraceId = buildSpansByTraceIdMap(previousWindow);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This map should already have been calculated. Is there a way to reuse the last result where previousWindow was currentWindow?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand your point. The windows maintained so that we handle the cases where map could not be built because of some slow (out of order) data.

kkondaka and others added 5 commits February 11, 2026 17:17
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Co-authored-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>, Neeraj Kumar <kneeraj@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Copy link
Copy Markdown
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I resolved the conversations on the completed items. I still have a few comments. And @KarstenSchnitter also has some good points we should address.

Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Copy link
Copy Markdown
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kkondaka

@KarstenSchnitter , Can you take another look and approve if it is good for you? We'd like to release this as experimental in 2.14.

@kkondaka
Copy link
Copy Markdown
Collaborator Author

@KarstenSchnitter Please review again. I cannot merge while you have "request for changes"

Copy link
Copy Markdown
Collaborator

@KarstenSchnitter KarstenSchnitter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can you answer my question on the peer forwarding? Out of curiosity I would like to know.

Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Copy link
Copy Markdown
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good @kkondaka . Let's be sure the tests pass (maybe not the Kafka ones).

@KarstenSchnitter can you re-review?

@dlvenable dlvenable merged commit e2e0839 into opensearch-project:main Feb 17, 2026
110 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a processor for application performance monitoring service map

3 participants