Iterate on OtelTransferListener#2
Merged
smurf667 merged 1 commit intosmurf667:1874-transfer-listenerfrom May 14, 2025
Merged
Conversation
cyrille-leclerc
commented
May 12, 2025
| | `otel.exporter.otlp.timeout` <br /> `OTEL_EXPORTER_OTLP_TIMEOUT` | `10000` | The maximum waiting time, in milliseconds, allowed to send each OTLP trace and metric batch. | | ||
| | `otel.resource.attributes` <br /> `OTEL_RESOURCE_ATTRIBUTES` | | Specify resource attributes in the following format: key1=val1,key2=val2,key3=val3 | | ||
| | `otel.instrumentation.maven.mojo.enabled` <br /> `OTEL_INSTRUMENTATION_MAVEN_MOJO_ENABLED` | `true` | Whether to create spans for mojo goal executions, `true` or `false`. Can be configured to reduce the number of spans created for large builds. | | ||
| | `otel.instrumentation.maven.transfer.enabled` <br /> `OTEL_INSTRUMENTATION_MAVEN_TRANSFER_ENABLED` | `false` | Whether to create spans for artifact transfers, `true` or `false`. Can be activated to understand impact of artifact transfers on performances. | |
| // TODO maybe default would be false | ||
| this.transferInstrumentationEnabled = | ||
| configProperties.getBoolean("otel.instrumentation.maven.transfer.enabled", true); | ||
| configProperties.getBoolean("otel.instrumentation.maven.transfer.enabled", false); |
Author
There was a problem hiding this comment.
Disable by default. I'm wondering if we could add later the option to create spans if the duration of a transfer is beyond a given threshold
| .setAttribute( | ||
| MavenOtelSemanticAttributes.MAVEN_TRANSFER_TYPE, event.getRequestType().name()); | ||
| MavenOtelSemanticAttributes.MAVEN_TRANSFER_TYPE, event.getRequestType().name()) | ||
| .setAttribute(MavenOtelSemanticAttributes.MAVEN_RESOURCE_NAME, event.getResource().getResourceName()); |
Author
There was a problem hiding this comment.
Very convenient when looking at the span.
smurf667
approved these changes
May 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Minor changes
Existing Issue(s):
< Link any applicable issues. >
Testing:
< Describe what testing was performed and any tests were added. >
Documentation:
< Describe the documentation added.
Please be sure to modify relevant existing documentation if needed. >
Outstanding items:
< Anything that these changes are intentionally missing
that will be needed or can be helpful in the future. >