elastic / elastic/apm

OTEL span identification breaks on external spans

Open
#846 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Gherkin
Stars
427
Forks
125
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I wanted to make sure that it wasn't a me-issue, so I invested untold amounts of time making sure of this.
I've instrumented two services that talk with each other through http and trying to play matchup is annoying so I ofc just forwarded a `b3` header between them to connect the spans into a single transaction.
Once connected, APM loses the capability of identifying anything regarding the spans beyond their associability and errors.
Easier to see to understand
Trace from Client, nice and pretty:
![CleanShot 2023-12-25 at 14 10 05@2x](https://github.com/elastic/apm/assets/22598347/cb3914fb-3066-4ce6-8d71-ff77111ffcda)
Trace from Server, so much detail, how lovely:
![CleanShot 2023-12-25 at 14 11 53@2x](https://github.com/elastic/apm/assets/22598347/c18c9197-6c8d-440e-a231-975bfe7641e8)

Connected. All the information is gone:
![CleanShot 2023-12-25 at 14 07 41@2x](https://github.com/elastic/apm/assets/22598347/89ff3b9a-a193-41f2-b542-b5e7f2bb7a6c)

This is not just the coloring, it's the tagging, it's the name subheader thing for requests, it's the chips tagging the transaction:
CleanShot 2023-12-25 at 14 17 32@2x
and other such things. Also, why does it say `GET http:`? it's supposed to say `GET`. or at least pull the `url.route` or something.

This also reminds me , shoving the entire fully-fledged url there like it sometimes does is really unhelpful. Something tagged with `GET https://my.subdomain.cloudinsatnce-hash.com/path/group/fa2c8bc2-361a-427f-beed-aa2f0ae15a8e/entity/3bc8e74e-d831-4172-8196-08da6fc228a2?param1=1¶m2=2¶m3=jfdkl&longParam=fjjkdaohfonsaohvunklareiahfjdlsghudaflscjnauehgjkdajhjjahifhjsk` might as well be untagged at all 🤔

There is no literature at all regarding anything otel in apm besides a "we have partial native support" statement so I might be missing something that is not written anywhere..

**To Reproduce**
Steps to reproduce the behavior:
1. connect any two traces from different resources
2. Information gone

**Expected behavior**
Information not-gone, or at least not **completely** scrubbed out

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the two-service trace connection described in the issue, forwarding the b3 header between services and comparing the resulting span details. Done means externally connected spans retain their identification, tags, request naming, transaction chips, and useful HTTP method or route information instead of being scrubbed.

Written by the indexing model from the issue text.

Assessment

Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.