Comments (2)
Hi @peterabbott,
First, to clarify:
- Are you using this APM agent (npm package
elastic-apm-node
) with its OpenTelemetry Bridge (https://www.elastic.co/guide/en/apm/agent/nodejs/master/opentelemetry-bridge.html) which supports calling the@opentelemetry/api
? - Or, are you using the OpenTelemetry SDK packages directly? (E.g.
@opentelemetry/sdk-node
,@opentelemetry/instrumentation
,@opentelemetry/instrumentation-*
)
For now, I'm assuming the latter.
For reasons I can't go into our stack is still on 7.14 (trying to upgrade) so it may very well be the version we are on.
I believe that may be part of it. My limited understanding is that APM server version 7.16 is when some more effort was put into translating some OTel span attributes into our span/transaction data model. My understanding is based on when support was added to support our OpenTelemetry Bridge work that I mentioned above. Its spec includes this section that refers to optional fallback handling for APM server versions earlier than 7.16: https://github.com/elastic/apm/blob/main/specs/agents/tracing-api-otel.md#attributes-mapping
It always comes through as a label.
Unfortunately, having said that, I think even with a more recent version -- perhaps you've tried a small test Elastic deployment on cloud.elastic.co? -- any user.*
span attributes will still come through as labels.
Current efforts in mapping fields are in merging Elastic's ECS data specs (e.g. here are the user.*
fields: https://www.elastic.co/guide/en/ecs/current/ecs-user.html) into OpenTelemetry's semantic conventions. This is a long process. I don't see anything user
-related in the current OpenTelemetry semconv: https://opentelemetry.io/docs/specs/semconv/general/trace/
The current code (again my possibly incomplete understanding) for translating OTLP fields into Elastic's documents is here: https://github.com/elastic/apm-data/tree/main/input/otlp/
I don't see any special handling of user.*
fields there, hence I expect them to end up as labels.
Are you wanting user.id
as is for your own queries and dashboards, or is this breaking/limiting something in the curated APM app in Kibana?
You might have more luck asking in the apm-server repo, to get more authoritative answers on the translations of OTel span attributes it is doing.
from apm-agent-nodejs.
thanks for the response. It was with both scenarios using the elastic-apm-node directrly and more recently the @opentelemetry api's.
After poking around the agent code, wondered if I was doing something wrong or not. Sounds like there is a combination of things working against me here, was really wanting to popluate the User section when looking via Kibana but querying by the label is just as easy.
I'd bee through that attribute mapping code many times, helped me discover I can set type
attribute on the OTel root span to change the Transaction Type that shows up on the APM dashboard side.
Thanks for the detailed response.
from apm-agent-nodejs.
Related Issues (20)
- support `node --enable-source-maps` usage with our custom `Error.prepareStackTrace` usage
- fix <database>.$cmd.getMore span on mongodb
- Memory usage reported incorrectly in k8s pod HOT 3
- Support of Next js ^14 HOT 2
- `_signalLambdaEnd` request to Lambda extension should set `Content-Type`
- Questions re ESM support for MikroOrm / knex, Node v20, & OIDC HOT 3
- Unhandled ERR_INVALID_URL causing node.js service to exit HOT 1
- remove opentracing doc
- issue labeler workflow failing HOT 7
- Support mtls connection
- test issue to see if labeler action works on an issue HOT 1
- edge "test-nightly" failing after kafka/zookeeper addition
- TAV failing for `[email protected]` HOT 4
- Agent doesn't capture uncaught exceptions or unhandled rejections HOT 11
- Request body is logged even with `captureBody: off` HOT 17
- undici instrumentation can add duplicate trace-context headers, which can break Elasticsearch HOT 2
- release fails in make-distribution.sh step
- KafkaJS instrumentation throw exception on "tombstone message" HOT 2
- Agent not working with Yarn Pnp + NextJS HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apm-agent-nodejs.