File tree Expand file tree Collapse file tree 8 files changed +36
-4
lines changed
instrumentation/spring/spring-boot-autoconfigure
src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure
main/java/io/opentelemetry/instrumentation/sdk
test/java/io/opentelemetry/instrumentation/sdk Expand file tree Collapse file tree 8 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ targets:
40
40
- type : gradle
41
41
path : ./
42
42
target : ' :sdk-autoconfigure-support'
43
+ - type : gradle
44
+ path : ./
45
+ target : ' :sdk-bridge'
43
46
- type : gradle
44
47
path : ./
45
48
target : ' :testing-common'
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ dependencies {
65
65
library(" org.springframework.boot:spring-boot-starter-data-r2dbc:$springBootVersion " )
66
66
67
67
implementation(" io.opentelemetry:opentelemetry-sdk-extension-autoconfigure" )
68
+ implementation(" io.opentelemetry:opentelemetry-sdk-extension-incubator" )
68
69
implementation(project(" :sdk-autoconfigure-support" ))
70
+ implementation(project(" :sdk-bridge" ))
69
71
compileOnly(" io.opentelemetry:opentelemetry-extension-trace-propagators" )
70
72
compileOnly(" io.opentelemetry.contrib:opentelemetry-aws-xray-propagator" )
71
73
compileOnly(" io.opentelemetry:opentelemetry-exporter-logging" )
Original file line number Diff line number Diff line change 29
29
import java .util .function .Function ;
30
30
import java .util .function .Supplier ;
31
31
import java .util .stream .Collectors ;
32
+ import io .opentelemetry .sdk .extension .incubator .fileconfig .DeclarativeConfiguration ;
33
+ import io .opentelemetry .sdk .extension .incubator .fileconfig .internal .model .OpenTelemetryConfigurationModel ;
32
34
import org .slf4j .Logger ;
33
35
import org .slf4j .LoggerFactory ;
34
36
import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
@@ -121,6 +123,7 @@ public AutoConfiguredOpenTelemetrySdk autoConfiguredOpenTelemetrySdk(
121
123
.build ();
122
124
}
123
125
126
+ // todo is not available with declarative config - unless via file property
124
127
@ Bean
125
128
public OpenTelemetry openTelemetry (
126
129
AutoConfiguredOpenTelemetrySdk autoConfiguredOpenTelemetrySdk ) {
@@ -145,6 +148,13 @@ public ConfigProperties otelProperties(
145
148
AutoConfiguredOpenTelemetrySdk autoConfiguredOpenTelemetrySdk ) {
146
149
return AutoConfigureUtil .getConfig (autoConfiguredOpenTelemetrySdk );
147
150
}
151
+
152
+ @ Bean (name = "otelProperties" )
153
+ public ConfigProperties otelBridgeProperties (OpenTelemetryConfigurationModel model ) {
154
+ // todo componet loader
155
+ // todo bridge properties
156
+ return DeclarativeConfiguration .toConfigProperties (model );
157
+ }
148
158
}
149
159
150
160
@ Configuration
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ dependencies {
13
13
14
14
implementation(project(" :instrumentation-api" ))
15
15
implementation(project(" :instrumentation-api-incubator" ))
16
+ implementation(project(" :sdk-bridge" ))
16
17
17
18
// autoconfigure is unstable, do not expose as api
18
19
implementation(" io.opentelemetry:opentelemetry-sdk-extension-autoconfigure" )
Original file line number Diff line number Diff line change
1
+ plugins {
2
+ id(" otel.java-conventions" )
3
+ id(" otel.publish-conventions" )
4
+ }
5
+
6
+ group = " io.opentelemetry.instrumentation"
7
+
8
+ dependencies {
9
+ implementation(" io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi" )
10
+ implementation(" io.opentelemetry:opentelemetry-api-incubator" )
11
+
12
+ testImplementation(" io.opentelemetry:opentelemetry-sdk-extension-incubator" )
13
+
14
+ compileOnly(" com.google.code.findbugs:annotations" )
15
+ testCompileOnly(" com.google.code.findbugs:annotations" )
16
+ }
Original file line number Diff line number Diff line change 3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*/
5
5
6
- package io .opentelemetry .javaagent . extension ;
6
+ package io .opentelemetry .instrumentation . sdk ;
7
7
8
- import static io .opentelemetry .api .incubator .config .DeclarativeConfigProperties .empty ;
9
8
10
9
import io .opentelemetry .api .incubator .config .ConfigProvider ;
11
10
import io .opentelemetry .api .incubator .config .DeclarativeConfigException ;
@@ -224,7 +223,7 @@ private static <T> T splitOnDot(
224
223
}
225
224
if (segments .length > 1 ) {
226
225
for (int i = 0 ; i < segments .length - 1 ; i ++) {
227
- target = target .getStructured (segments [i ], empty ());
226
+ target = target .getStructured (segments [i ], DeclarativeConfigProperties . empty ());
228
227
}
229
228
}
230
229
String lastPart = segments [segments .length - 1 ];
Original file line number Diff line number Diff line change 3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*/
5
5
6
- package io .opentelemetry .javaagent . extension ;
6
+ package io .opentelemetry .instrumentation . sdk ;
7
7
8
8
import static org .assertj .core .api .Assertions .assertThat ;
9
9
import static org .assertj .core .api .Assertions .assertThatThrownBy ;
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ include(":javaagent-internal-logging-application")
86
86
include(" :javaagent-internal-logging-simple" )
87
87
include(" :javaagent" )
88
88
include(" :sdk-autoconfigure-support" )
89
+ include(" :sdk-bridge" )
89
90
90
91
include(" :bom" )
91
92
include(" :bom-alpha" )
You can’t perform that action at this time.
0 commit comments