quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Exclude uri from otel tracing

Open mcruzdev opened this issue 1 year ago • 3 comments

What

This pull request creates a new BuildItem that is used for drop uri from tracing when using quarkus-opentelemetry extension. The DropApplicationUrisBuildItem is generated from the scanning of the @Traceless annotation.

The @Traceless annotation is used with the jakarta.ws.rs.Path annotation. If annotated at class level all uri below will be ignored for tracing.

If your @Path annotation contains expression like @Path("/cars/{carId}") the extension will ignore all thing after cars using, e.g. cars*.

Why

You can see the issue below, or directly this Stackoverflow discussion.

Fixes #42659

mcruzdev avatar Oct 15 '24 17:10 mcruzdev

Thanks for your pull request!

Your pull request does not follow our editorial rules. Could you have a look?

  • description should not be empty, describe your intent or provide links to the issues this PR is fixing (using Fixes #NNNNN) or changelogs

This message is automatically generated by a bot.

quarkus-bot[bot] avatar Oct 15 '24 17:10 quarkus-bot[bot]

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

quarkus-bot[bot] avatar Oct 15 '24 17:10 quarkus-bot[bot]

First draft pull request. Feel free to add any suggestions!

cc: @brunobat

mcruzdev avatar Oct 15 '24 17:10 mcruzdev


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit d28274610a421a9bc77c718f207857d4e5a45bb2.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

:gear: JVM Tests - JDK 17 Windows

:package: extensions/opentelemetry/deployment

io.quarkus.opentelemetry.deployment.metrics.HttpServerMetricsTest.collectsHttpRouteFromEndAttributes - History

  • Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter.assertCountPointsAtLeast(InMemoryMetricExporter.java:131)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter_ClientProxy.assertCountPointsAtLeast(Unknown Source)

quarkus-bot[bot] avatar Oct 21 '24 08:10 quarkus-bot[bot]

🙈 The PR is closed and the preview is expired.

github-actions[bot] avatar Oct 21 '24 16:10 github-actions[bot]


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 402ff7a0f086561ee417ba369c13d6c665812476.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

[!WARNING] There are other workflow runs running, you probably need to wait for their status before merging.

quarkus-bot[bot] avatar Oct 21 '24 16:10 quarkus-bot[bot]


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 402ff7a0f086561ee417ba369c13d6c665812476.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

:gear: JVM Tests - JDK 17

:package: integration-tests/mongodb-panache

io.quarkus.it.mongodb.panache.ReflectionFreeSerializationTest.testReactiveBookEntity - History

  • com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input at [Source: REDACTED (\StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]-java.lang.RuntimeException`
java.lang.RuntimeException: 
com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
	at io.restassured.internal.path.json.mapping.JsonPathJackson2ObjectDeserializer.deserialize(JsonPathJackson2ObjectDeserializer.java:30)
	at io.restassured.path.json.mapping.JsonPathObjectDeserializer$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.Jackson2Mapper.deserialize(Jackson2Mapper.groovy:58)
	at io.restassured.mapper.ObjectMapper$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.ObjectMapping.parseWithJackson2(ObjectMapping.groovy:254)

:gear: JVM Tests - JDK 21

:package: integration-tests/mongodb-panache

io.quarkus.it.mongodb.panache.ReflectionFreeSerializationTest.testReactiveBookEntity - History

  • com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input at [Source: REDACTED (\StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]-java.lang.RuntimeException`
java.lang.RuntimeException: 
com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
	at io.restassured.internal.path.json.mapping.JsonPathJackson2ObjectDeserializer.deserialize(JsonPathJackson2ObjectDeserializer.java:30)
	at io.restassured.path.json.mapping.JsonPathObjectDeserializer$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.Jackson2Mapper.deserialize(Jackson2Mapper.groovy:58)
	at io.restassured.mapper.ObjectMapper$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.ObjectMapping.parseWithJackson2(ObjectMapping.groovy:254)

quarkus-bot[bot] avatar Oct 21 '24 16:10 quarkus-bot[bot]


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 1752c26493643d4e27af7f725359e8025a3513cc.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

[!WARNING] There are other workflow runs running, you probably need to wait for their status before merging.

quarkus-bot[bot] avatar Oct 23 '24 18:10 quarkus-bot[bot]


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 1752c26493643d4e27af7f725359e8025a3513cc.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

:gear: JVM Tests - JDK 17

:package: integration-tests/mongodb-panache

io.quarkus.it.mongodb.panache.ReflectionFreeSerializationTest.testReactiveBookEntity - History

  • com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input at [Source: REDACTED (\StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]-java.lang.RuntimeException`
java.lang.RuntimeException: 
com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
	at io.restassured.internal.path.json.mapping.JsonPathJackson2ObjectDeserializer.deserialize(JsonPathJackson2ObjectDeserializer.java:30)
	at io.restassured.path.json.mapping.JsonPathObjectDeserializer$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.Jackson2Mapper.deserialize(Jackson2Mapper.groovy:58)
	at io.restassured.mapper.ObjectMapper$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.ObjectMapping.parseWithJackson2(ObjectMapping.groovy:254)
  • com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input at [Source: REDACTED (\StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]-java.lang.RuntimeException`
java.lang.RuntimeException: 
com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
	at io.restassured.internal.path.json.mapping.JsonPathJackson2ObjectDeserializer.deserialize(JsonPathJackson2ObjectDeserializer.java:30)
	at io.restassured.path.json.mapping.JsonPathObjectDeserializer$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.Jackson2Mapper.deserialize(Jackson2Mapper.groovy:58)
	at io.restassured.mapper.ObjectMapper$deserialize.call(Unknown Source)
	at io.restassured.internal.mapping.ObjectMapping.parseWithJackson2(ObjectMapping.groovy:254)

quarkus-bot[bot] avatar Oct 23 '24 19:10 quarkus-bot[bot]


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit e31a5b75d488d62527f4fbfcf5d4ade5781612a1.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

[!WARNING] There are other workflow runs running, you probably need to wait for their status before merging.

quarkus-bot[bot] avatar Oct 29 '24 14:10 quarkus-bot[bot]


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit e31a5b75d488d62527f4fbfcf5d4ade5781612a1.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

quarkus-bot[bot] avatar Oct 29 '24 15:10 quarkus-bot[bot]

Sorry, for delay @brunobat. I have been very busy lately.

I answered your comments!

mcruzdev avatar Nov 13 '24 12:11 mcruzdev


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit f202f18b2900870ba3c01790934e2f04bfc865ff.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

[!WARNING] There are other workflow runs running, you probably need to wait for their status before merging.

quarkus-bot[bot] avatar Nov 13 '24 13:11 quarkus-bot[bot]


:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.


Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit f202f18b2900870ba3c01790934e2f04bfc865ff.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

:gear: JVM Tests - JDK 17

:package: integration-tests/opentelemetry-vertx-exporter

io.quarkus.it.opentelemetry.vertx.exporter.grpc.SimpleGrpcNoTLSNoCompressionTest.test - History

  • Assertion condition defined as a Lambda expression in io.quarkus.it.opentelemetry.vertx.exporter.AbstractExporterTest Expecting size of: [resource_metrics { resource { attributes { - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: 
Assertion condition defined as a Lambda expression in io.quarkus.it.opentelemetry.vertx.exporter.AbstractExporterTest 
Expecting size of:
  [resource_metrics {
  resource {
    attributes {
      key: "host.name"
      value {

quarkus-bot[bot] avatar Nov 13 '24 14:11 quarkus-bot[bot]

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 88f628da40b5aa1eb7ea5ed66d827c5a1affc86b.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

[!WARNING] There are other workflow runs running, you probably need to wait for their status before merging.

quarkus-bot[bot] avatar Nov 13 '24 16:11 quarkus-bot[bot]

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 88f628da40b5aa1eb7ea5ed66d827c5a1affc86b.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

:gear: JVM Tests - JDK 17

:package: integration-tests/opentelemetry-vertx-exporter

io.quarkus.it.opentelemetry.vertx.exporter.grpc.SimpleGrpcNoTLSNoCompressionTest.test - History

  • Assertion condition defined as a Lambda expression in io.quarkus.it.opentelemetry.vertx.exporter.AbstractExporterTest Expecting size of: [resource_metrics { resource { attributes { - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: 
Assertion condition defined as a Lambda expression in io.quarkus.it.opentelemetry.vertx.exporter.AbstractExporterTest 
Expecting size of:
  [resource_metrics {
  resource {
    attributes {
      key: "host.name"
      value {

quarkus-bot[bot] avatar Nov 13 '24 16:11 quarkus-bot[bot]

Hi, @mcruzdev. Thanks for the PR!

Quick question, does this PR also covers REST Client? Original Stackoverflow question (which lead to the creation of https://github.com/quarkusio/quarkus/issues/42659) was related to REST Client (quarkus-rest-client), to omit the addition of Otel info (traceId, etc.) as header in the request. However, what I can interpret from the tests, is that the PR is covering only quarkus-rest (to stop tracing requests that enter to the app). Is that the case?

gian1200 avatar Mar 08 '25 17:03 gian1200

I am out today, I will take a look tomorrow and let you know! I really did not remember

On Sat, 8 Mar 2025 at 14:55 Giancarlo Calderón Cárdenas < @.***> wrote:

Hi, @mcruzdev https://github.com/mcruzdev. Thanks for the PR!

Quick question, does this PR also covers REST Client? Original Stackoverflow question https://stackoverflow.com/questions/78742740/how-to-disable-trace-ids-for-specific-rest-clients-invocations/78748952 (which lead to the creation of #42659 https://github.com/quarkusio/quarkus/issues/42659) was related to REST Client (quarkus-rest-client), but what I can interpret from the tests, is that the PR is covering only quarkus-rest. Is that the case?

— Reply to this email directly, view it on GitHub https://github.com/quarkusio/quarkus/pull/43885#issuecomment-2708418264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANNYI63357H6P7TXH2732WT2TMVJ5AVCNFSM6AAAAABP7TMM5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBYGQYTQMRWGQ . You are receiving this because you were mentioned.Message ID: @.***> [image: gian1200]gian1200 left a comment (quarkusio/quarkus#43885) https://github.com/quarkusio/quarkus/pull/43885#issuecomment-2708418264

Hi, @mcruzdev https://github.com/mcruzdev. Thanks for the PR!

Quick question, does this PR also covers REST Client? Original Stackoverflow question https://stackoverflow.com/questions/78742740/how-to-disable-trace-ids-for-specific-rest-clients-invocations/78748952 (which lead to the creation of #42659 https://github.com/quarkusio/quarkus/issues/42659) was related to REST Client (quarkus-rest-client), but what I can interpret from the tests, is that the PR is covering only quarkus-rest. Is that the case?

— Reply to this email directly, view it on GitHub https://github.com/quarkusio/quarkus/pull/43885#issuecomment-2708418264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANNYI63357H6P7TXH2732WT2TMVJ5AVCNFSM6AAAAABP7TMM5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBYGQYTQMRWGQ . You are receiving this because you were mentioned.Message ID: @.***>

mcruzdev avatar Mar 08 '25 20:03 mcruzdev

@gian1200 This issue was later removed and is not currently active in the code. There are many cases that make this a feature we cannot currently support. See Michal's comment, above: https://github.com/quarkusio/quarkus/pull/43885#discussion_r1857472384

brunobat avatar Mar 10 '25 10:03 brunobat

Thank you @brunobat by the answer!

mcruzdev avatar Mar 10 '25 11:03 mcruzdev