Skip to content

Commit

Permalink
update upstream to 2.3.0 (#454)
Browse files Browse the repository at this point in the history
* update upstream, retiring our implementation of service.instance.id

* "logging" has been renamed to "console"

* fix markdown

* version bumps
  • Loading branch information
zeitlinger authored Apr 12, 2024
1 parent 6fb69a5 commit 44d7fb2
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 176 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.3.0-beta.1 (2024-04-12)

- Update to [OpenTelemetry 2.3.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CHANGELOG.md#version-230-2024-04-12)

## 2.2.0-beta.1 (2024-03-15)

- Update to [OpenTelemetry 2.2.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CHANGELOG.md#version-220-2024-03-14)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ENV OTEL_SERVICE_NAME=<Service Name>
# - Click on "Application"
# Note: It might take up to five minutes for data to appear.

ARG version=2.2.0-beta.1
ARG version=2.3.0-beta.1
WORKDIR /app/

# use a fixed version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ENV OTEL_RESOURCE_ATTRIBUTES=deployment.environment=<Environment>,service.namesp
# - Click on "Application"
# Note: It might take up to five minutes for data to appear.

ARG version=2.2.0-beta.1
ARG version=2.3.0-beta.1
WORKDIR /app/

# use a fixed version
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
group 'com.grafana'
version '2.2.0-beta.1'
version '2.3.0-beta.1'

buildscript {
ext {
otelInstrumentationVersion = "2.2.0"
otelInstrumentationVersion = "2.3.0"
}
repositories {
maven {
Expand All @@ -26,7 +26,7 @@ subprojects {
ext {
versions = [
// this line is managed by .github/scripts/update-sdk-version.sh
opentelemetrySdk : "1.36.0",
opentelemetrySdk : "1.37.0",

// these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : otelInstrumentationVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ static Map<String, String> customizeProperties(
String userExporter = userConfigs.getString(propName, "otlp");
String adviceExporter = advice.get(propName);
String exporter =
userExporter.equals("none") || userExporter.contains("logging") || adviceExporter == null
userExporter.equals("none")
|| userExporter.contains("console")
|| userExporter.contains("logging")
|| adviceExporter == null
? userExporter
: userExporter.concat(adviceExporter);
overrides.put(propName, exporter);
Expand Down Expand Up @@ -85,7 +88,7 @@ public static Map<String, String> getAdviceExporters(GrafanaLoggingConfig config
LoggingExporterConfigCustomizer::getOtelExporterPropName, v -> ""));
for (String signal : signalsToEnable) {
if (SIGNAL_TYPES.contains(signal.toLowerCase())) {
loggingConfig.put(getOtelExporterPropName(signal), ",logging");
loggingConfig.put(getOtelExporterPropName(signal), ",console");
}
}
logger.fine("Logging status: " + loggingConfig);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@

public class DistributionVersion {

public static final String VERSION = "2.2.0-beta.1";
public static final String VERSION = "2.3.0-beta.1";
}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
com.grafana.extensions.resources.DistributionResourceProvider
com.grafana.extensions.resources.ServiceInstanceIdResourceProvider
Original file line number Diff line number Diff line change
Expand Up @@ -58,48 +58,48 @@ private static Stream<Arguments> provideCustomConfigurations() {
new TestCase(
Map.of(DEBUG_LOGGING_PROP, "true"),
Map.of(
METRICS_EXPORTER_PROP, "otlp,logging",
TRACES_EXPORTER_PROP, "otlp,logging",
LOG_EXPORTER_PROP, "otlp,logging"))),
METRICS_EXPORTER_PROP, "otlp,console",
TRACES_EXPORTER_PROP, "otlp,console",
LOG_EXPORTER_PROP, "otlp,console"))),
Arguments.of(
"debugLogging is on but logging exporter is already set",
"debugLogging is on but console exporter is already set",
new TestCase(
Map.of(
DEBUG_LOGGING_PROP,
"true",
METRICS_EXPORTER_PROP,
"otlp,logging",
"otlp,logging", // logging is the old name for console, but still supported
TRACES_EXPORTER_PROP,
"otlp,logging",
"otlp,console",
LOG_EXPORTER_PROP,
"otlp,logging"),
"otlp,console"),
Map.of(
METRICS_EXPORTER_PROP, "otlp,logging",
TRACES_EXPORTER_PROP, "otlp,logging",
LOG_EXPORTER_PROP, "otlp,logging"))),
TRACES_EXPORTER_PROP, "otlp,console",
LOG_EXPORTER_PROP, "otlp,console"))),
Arguments.of(
"loggingExporterEnabled set with all signals",
new TestCase(
Map.of(LOGGING_ENABLED_PROP, "metrics,traces,logs"),
Map.of(
METRICS_EXPORTER_PROP, "otlp,logging",
TRACES_EXPORTER_PROP, "otlp,logging",
LOG_EXPORTER_PROP, "otlp,logging"))),
METRICS_EXPORTER_PROP, "otlp,console",
TRACES_EXPORTER_PROP, "otlp,console",
LOG_EXPORTER_PROP, "otlp,console"))),
Arguments.of(
"loggingExporterEnabled set with metrics,traces",
new TestCase(
Map.of(LOGGING_ENABLED_PROP, "metrics,traces"),
Map.of(
LOG_EXPORTER_PROP, "otlp",
METRICS_EXPORTER_PROP, "otlp,logging",
TRACES_EXPORTER_PROP, "otlp,logging"))),
METRICS_EXPORTER_PROP, "otlp,console",
TRACES_EXPORTER_PROP, "otlp,console"))),
Arguments.of(
"Logging cannot be appended for exporter that is manually set to `none`",
new TestCase(
Map.of(DEBUG_LOGGING_PROP, "true", METRICS_EXPORTER_PROP, "none"),
Map.of(
METRICS_EXPORTER_PROP, "none",
TRACES_EXPORTER_PROP, "otlp,logging",
LOG_EXPORTER_PROP, "otlp,logging"))));
TRACES_EXPORTER_PROP, "otlp,console",
LOG_EXPORTER_PROP, "otlp,console"))));
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion examples/jdbc/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/jdbc/spring-boot-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/jetty/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/jetty/spring-boot-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/jms/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/jms/spring-boot-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/kafka/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/kafka/spring-boot-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/log4j/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
2 changes: 1 addition & 1 deletion examples/logback/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
4 changes: 2 additions & 2 deletions examples/manual/spring-boot-non-reactive-2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ repositories {

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation('io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.2.0')
implementation('io.opentelemetry:opentelemetry-api:1.36.0')
implementation('io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.3.0')
implementation('io.opentelemetry:opentelemetry-api:1.37.0')
}

bootRun {
Expand Down
6 changes: 3 additions & 3 deletions examples/manual/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand All @@ -17,8 +17,8 @@ repositories {

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation('io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.2.0')
implementation('io.opentelemetry:opentelemetry-api:1.36.0')
implementation('io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.3.0')
implementation('io.opentelemetry:opentelemetry-api:1.37.0')
}

bootRun {
Expand Down
2 changes: 1 addition & 1 deletion examples/mongodb/spring-boot-non-reactive-3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}

Expand Down
Loading

0 comments on commit 44d7fb2

Please sign in to comment.