Skip to content
This repository was archived by the owner on Aug 6, 2024. It is now read-only.

Commit 2d80143

Browse files
committed
Add build properties file in its own namespace to carry project version info.
1 parent acf3c39 commit 2d80143

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

wavefront-spring-boot-bom/pom.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,30 @@
3232
<dependency>
3333
<groupId>com.wavefront</groupId>
3434
<artifactId>wavefront-opentracing-sdk-java</artifactId>
35-
<version>2.0</version>
35+
<version>2.1.1</version>
3636
</dependency>
3737
<dependency>
3838
<groupId>com.wavefront</groupId>
3939
<artifactId>wavefront-runtime-sdk-jvm</artifactId>
40-
<version>1.1</version>
40+
<version>1.3.1</version>
4141
</dependency>
4242
<dependency>
4343
<groupId>com.wavefront</groupId>
4444
<artifactId>wavefront-sdk-java</artifactId>
45-
<version>2.5</version>
45+
<version>2.6.2</version>
4646
</dependency>
4747
</dependencies>
4848
</dependencyManagement>
4949
<build>
50+
<resources>
51+
<resource>
52+
<directory>src/main/resources</directory>
53+
</resource>
54+
<resource>
55+
<directory>src/main/resources/</directory>
56+
<filtering>true</filtering>
57+
</resource>
58+
</resources>
5059
<plugins>
5160
<plugin>
5261
<groupId>org.codehaus.mojo</groupId>

wavefront-spring-boot/src/main/java/com/wavefront/spring/autoconfigure/WavefrontSleuthSpanHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.wavefront.java_sdk.com.google.common.collect.Sets;
2525
import com.wavefront.sdk.common.NamedThreadFactory;
2626
import com.wavefront.sdk.common.Pair;
27+
import com.wavefront.sdk.common.Utils;
2728
import com.wavefront.sdk.common.WavefrontSender;
2829
import com.wavefront.sdk.common.application.ApplicationTags;
2930
import com.wavefront.sdk.entities.tracing.SpanLog;
@@ -75,6 +76,7 @@ final class WavefrontSleuthSpanHandler extends SpanHandler implements Runnable,
7576

7677
private final static String DEFAULT_SOURCE = "wavefront-spring-boot";
7778
private final static String WAVEFRONT_GENERATED_COMPONENT = "wavefront-generated";
79+
public static final String SDK_METRIC_PREFIX = "~sdk.java.wavefront_spring_boot_starter.";
7880

7981
final LinkedBlockingQueue<Pair<TraceContext, MutableSpan>> spanBuffer;
8082
final WavefrontSender wavefrontSender;
@@ -132,6 +134,8 @@ final class WavefrontSleuthSpanHandler extends SpanHandler implements Runnable,
132134
this.spanBuffer = new LinkedBlockingQueue<>(maxQueueSize);
133135

134136
// init internal metrics
137+
double sdkVersion = Utils.getSemVerGauge("wavefront-spring-boot");
138+
meterRegistry.gauge(SDK_METRIC_PREFIX + "version", sdkVersion);
135139
meterRegistry.gauge("reporter.queue.size", spanBuffer, sb -> (double) sb.size());
136140
meterRegistry.gauge("reporter.queue.remaining_capacity", spanBuffer,
137141
sb -> (double) sb.remainingCapacity());
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
project.version=${project.version}

0 commit comments

Comments
 (0)