-
Notifications
You must be signed in to change notification settings - Fork 791
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
[Vert.x project] http.route not resolving to complete url #11493
Comments
Please provide a minimal application that reproduces the issue along with any necessary instructions. |
@laurit Please use below minimal application to replicate the issue: 1.) Clone the sample vert.x project from here: 2.) Build the jar from the above vert.x application using below command: 3.) Run the published application jar from its location (/.m2) with opentelemetry javaagent jar version: 2.3.0 using below command: 4.) Call the API curl with endpoint /supply-service/health-check for http.route resolution check: 5.) Check the logs published in /opt/app/logs/supply-service.log for opentelemetry generated http.route value which shows the only the application context path(/supply-service) rather than api path (/supply-service/health-check):
Expected
|
@kintan-singh-backend I was not able to reproduce this. Firstly using the jar from the maven repository didn't work for me. That jar does not have a manifest and it does not include dependencies, executing it with java -jar won't work so I ran the application form the IDE instead. Output from
|
@laurit can you please try cloning the project again from here and rerun for logs from local IDE: https://github.com/kintan123/openTelemetryVertx |
@kintan-singh-backend now it does not compile |
Describe the bug
Need help with http.route resolution in vert.x project:
Recently we started using Opentelemetry java agent instrumentation for metrics and traces to be passed to our datadog agent and then send them to Datadog server using below reference doc. But we are getting http.route as "/supply-service" in our vert.x services while in SpringBoot service we are getting it as "supply-service/health-check".
Can someone please help us in getting this http.route value resolved for our Opentelemetry java agent automatic instrumentation in our vert.x project.
Also in the semantic conventions we can see that the http.route will be sent as complete in http spans as given here: https://opentelemetry.io/docs/specs/semconv/http/http-spans/
Steps to reproduce
Referece doc for setup: https://github.com/open-telemetry/opentelemetry-java-instrumentation?tab=readme-ov-file#configuring-the-agent
https://docs.datadoghq.com/opentelemetry/interoperability/otlp_ingest_in_the_agent/?tab=kuberneteshelmvaluesyaml
Steps to reproduce:
Using sample application:
Please use below minimal application to replicate the issue:
1.) Clone the sample vert.x project from here:
https://github.com/kintan123/openTelemetryVertx.git
2.) Build the jar from the above vert.x application using below command:
./gradlew jar publishToMavenLocal
This will publish the jar in m2 repository under this path:
/Users/<YOUR_USER>/.m2/repository/com/example/supply-service/1.0.0/supply-service-1.0.0.jar
3.) Run the published application jar from its location (/.m2) with opentelemetry javaagent jar version: 2.3.0 using below command:
java -javaagent:/Users/<PATH_TO_JAVA_AGENT>/opentelemetry-javaagent.jar -Dotel.logs.exporter=none -Dotel.traces.exporter=logging-otlp -Dotel.metrics.exporter=logging-otlp -Dotel.resource.attributes=service.name=Test-service -Dotel.javaagent.enabled=true -jar supply-service-1.0.0.jar
4.) Call the API curl with endpoint /supply-service/health-check for http.route resolution check:
curl --location --request GET 'http://localhost:8082/supply-service/health-check'
5.) Check the logs published in /opt/app/logs/supply-service.log for opentelemetry generated http.route value which shows the only the application context path(/supply-service) rather than api path (/supply-service/health-check):
Actual
Expected
DATADOG PRODUCTION CONFIGURATION STEPS:
1. Adding OpenTelemetry Java Agent
To instrument the application using the OpenTelemetry Java agent, we use the following command:
CMD ["java", "-javaagent:/opt/app/opentelemetry-javaagent.jar", "-jar", "/opt/app/our-service-1.0.0.jar"]
2. Configuring OTLP Ingestion
a. OTLP Receiver Configuration
Add the following configuration to enable OTLP ingestion in the Datadog agent:
Datadog agent version - 7.51.0 and configuration
b. Environment Variables
Set the following environment variables for the application deployment to configure the OTLP exporter:
Configuration for opentelementry java agent(Version 2.3.0) is
Expected behavior
Attaching before and after images for resource info in our current datadog server with route info coming up as only the context path for vert.x project while coming up as complete path for other projects.
Attaching complete span info details for requests in vert.x project from both earlier datadog java agent instrumentation and new opentelemetry java agent instrumentation for reference.
previousDatadogJavaAgentSpanInfo.docx
Actual behavior
The span info http.route is not having complete url and resource endpoint url is also not showing in Datadog server as shown above in expected behaviour.
openTelemetrySpanInfo.docx
Javaagent or library instrumentation version
v2.3.0
Environment
JDK:
OS:
Additional context
No response
The text was updated successfully, but these errors were encountered: