Skip to content

Iterate on OtelTransferListener#2

Merged
smurf667 merged 1 commit intosmurf667:1874-transfer-listenerfrom
cyrille-leclerc:1874-transfer-listener
May 14, 2025
Merged

Iterate on OtelTransferListener#2
smurf667 merged 1 commit intosmurf667:1874-transfer-listenerfrom
cyrille-leclerc:1874-transfer-listener

Conversation

@cyrille-leclerc
Copy link
Copy Markdown

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. >

@cyrille-leclerc cyrille-leclerc marked this pull request as ready for review May 12, 2025 21:33
Comment thread maven-extension/README.md
| `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. |
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add documentation

// TODO maybe default would be false
this.transferInstrumentationEnabled =
configProperties.getBoolean("otel.instrumentation.maven.transfer.enabled", true);
configProperties.getBoolean("otel.instrumentation.maven.transfer.enabled", false);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very convenient when looking at the span.

@smurf667 smurf667 merged commit 2c14c29 into smurf667:1874-transfer-listener May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants