Giter Site home page Giter Site logo

Comments (2)

trentm avatar trentm commented on June 1, 2024

Hi @peterabbott,

First, to clarify:

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.

peterabbott avatar peterabbott commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.