Skip to content

Commit ce3873d

Browse files
Use Implementation-Version as raw version (getsentry#4291)
* Check for mixed SDK versions * Format code * format + api * Init noops if mixed versions detected * Add BuildConfig * config entries for agentless module sdk names * Add MANIFEST.MF for JARs * Throw on startup; use manifests for backend; reuse code for otel * Format code * Format code * changelog * api * changelog * Remove duplicate addPackage calls * remove test assertion for package * Introduce fatal SDK logger * Use Implementation-Version as raw version * Format code * changelog * remove duplicate attr def --------- Co-authored-by: Sentry Github Bot <[email protected]>
1 parent 460594f commit ce3873d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
- Do not override user-defined `SentryOptions` ([#4262](https://github.com/getsentry/sentry-java/pull/4262))
2626
- Session Replay: Change bitmap config to `ARGB_8888` for screenshots ([#4282](https://github.com/getsentry/sentry-java/pull/4282))
27+
- The `MANIFEST.MF` of `sentry-opentelemetry-agent` now has `Implementation-Version` set to the raw version ([#4291](https://github.com/getsentry/sentry-java/pull/4291))
28+
- An example value would be `8.6.0`
29+
- The value of the `Sentry-Version-Name` attribute looks like `sentry-8.5.0-otel-2.10.0`
2730

2831
### Internal
2932

sentry-opentelemetry/sentry-opentelemetry-agent/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ tasks {
147147
attributes.put("Can-Retransform-Classes", "true")
148148
attributes.put("Implementation-Vendor", "Sentry")
149149
attributes.put("Implementation-Title", project.name)
150-
attributes.put("Implementation-Version", "sentry-${project.version}-otel-${Config.Libs.OpenTelemetry.otelInstrumentationVersion}")
151-
attributes.put("Sentry-Version-Name", project.version)
150+
attributes.put("Implementation-Version", project.version)
151+
attributes.put("Sentry-Version-Name", "sentry-${project.version}-otel-${Config.Libs.OpenTelemetry.otelInstrumentationVersion}")
152152
attributes.put("Sentry-SDK-Name", Config.Sentry.SENTRY_OPENTELEMETRY_AGENT_SDK_NAME)
153153
attributes.put("Sentry-SDK-Package-Name", "maven:io.sentry:sentry-opentelemetry-agent")
154154
attributes.put("Sentry-Opentelemetry-SDK-Name", Config.Sentry.SENTRY_OPENTELEMETRY_AGENT_SDK_NAME)

sentry/src/main/java/io/sentry/internal/ManifestVersionReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void readManifestFiles() {
6161
final @Nullable Attributes mainAttributes = manifest.getMainAttributes();
6262
if (mainAttributes != null) {
6363
final @Nullable String name = mainAttributes.getValue("Sentry-Opentelemetry-SDK-Name");
64-
final @Nullable String version = mainAttributes.getValue("Sentry-Version-Name");
64+
final @Nullable String version = mainAttributes.getValue("Implementation-Version");
6565
final @Nullable String sdkName = mainAttributes.getValue("Sentry-SDK-Name");
6666
final @Nullable String packageName = mainAttributes.getValue("Sentry-SDK-Package-Name");
6767

0 commit comments

Comments
 (0)