Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB Traces not recognized as Database Service in Dynatrace #275

Open
sebastien-savalle opened this issue Jan 9, 2025 · 3 comments
Open
Labels

Comments

@sebastien-savalle
Copy link

Hello,

We are migrating our applications from the Dynatrace One agent sdk to cap-js/telemetry.
With the One Agent sdk, traces generated by the db layer (hana) are correctly identified as a database service and we can also filter by service type = database.

This is no longer possible with cap-js/telemetry.
Could you enhance the library to include the service type ?

Trace example with one-agent sdk:
image

Same this cap-js/telemetry
image

Thanks a lot,
Sebastien

@github-actions github-actions bot added the new label Jan 9, 2025
@sjvans
Copy link
Contributor

sjvans commented Jan 9, 2025

hi @sebastien-savalle

i believe this is a dynatrace issue. they should be able to derive this information from the attribute db.system, which we set. also, i couldn't find a service type in the official list at https://opentelemetry.io/docs/specs/semconv/.

what do you think, @yevgentrukhin?

thanks and best,
sebastian

@sebastien-savalle
Copy link
Author

Both approach should work as described in the dynatrace documentation. I guess some configuration is missing, either in the span (service type), either the dynatrace config ?

Dynatrace documentation: https://docs.dynatrace.com/docs/observe/applications-and-microservices/databases/database-services-classic/how-database-activity-is-monitored#expand--database-calls-and-purepathr-technology

Database calls and PurePath® technology
The distributed trace of a database request shows a particular database statement executed by the application. Because the traces are captured within the application and not on the database itself, you will see database statements traces only if the application that makes them either sends distributed traces to the OpenTelemetry trace ingest API or is monitored via the OneAgent. If there are no distributed traces already started by the said application, you can define a custom service. See the Method hotspots page to choose a method that is called before the database request in the same thread.

@yevgentrukhin
Copy link

Hi Sebastien, I would not recommend removing OneAgent and I would recommend using as well OneAgent-sdk dependency to get DB SQL statements. Unfortunately, it will take time that DT UIs become updated to support OTEL based DB services. We can take this discussion offline. Thanks Yevgen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants