Skip to content

Commit 6a23d83

Browse files
committed
merge main
2 parents 867dc70 + f1da1f0 commit 6a23d83

File tree

57 files changed

+359
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+359
-197
lines changed

conventions/src/main/kotlin/io.opentelemetry.instrumentation.javaagent-shadowing.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ plugins {
77
// NOTE: any modifications below should also be made in
88
// io.opentelemetry.instrumentation.muzzle-check.gradle.kts
99
tasks.withType<ShadowJar>().configureEach {
10-
// mergeServiceFiles requires that duplicate strategy is set to include
11-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
1210
mergeServiceFiles()
11+
// mergeServiceFiles requires that duplicate strategy is set to include
12+
filesMatching("META-INF/services/**") {
13+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
14+
}
1315
// Merge any AWS SDK service files that may be present (too bad they didn't just use normal
1416
// service loader...)
1517
mergeServiceFiles("software/amazon/awssdk/global/handlers")
18+
// mergeServiceFiles requires that duplicate strategy is set to include
19+
filesMatching("software/amazon/awssdk/global/handlers/**") {
20+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
21+
}
1622

1723
exclude("**/module-info.class")
1824

docs/contributing/documenting-instrumentation.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,33 @@ At a minimum, every instrumentation metadata file should include a `description`
8686

8787
Some example descriptions:
8888

89-
* This instrumentation enables SERVER spans and metrics for the ActiveJ HTTP server.
89+
* This instrumentation enables HTTP server spans and HTTP server metrics for the ActiveJ HTTP server.
9090
* This instrumentation provides context propagation for Akka actors, it does not emit any telemetry
9191
on its own.
9292
* The Alibaba Druid instrumentation generates database connection pool metrics for druid data sources.
93-
* The Apache Dubbo instrumentation provides CLIENT and SERVER spans
94-
for Apache Dubbo RPC calls. Each call produces a span named after the Dubbo
95-
method, enriched with standard RPC attributes (system, service, method), network
96-
attributes, and error details if an exception occurs.
93+
* The Apache Dubbo instrumentation provides RPC client spans and RPC server spans for Apache Dubbo
94+
RPC calls. Each call produces a span named after the Dubbo method, enriched with standard RPC
95+
attributes (system, service, method), network attributes, and error details if an exception
96+
occurs.
9797

9898
Some notes when writing descriptions:
9999

100100
* You don't always need to explicitly name the instrumentation, and you can start with "This
101101
instrumentation..."
102102
* Prefer the convention of using the word "enables" when describing what the instrumentation does,
103-
"This instrumentation enables SERVER spans and metrics for the ActiveJ" instead of something like
104-
"This instrumentation provides SERVER spans and metrics for the ActiveJ".
103+
"This instrumentation **enables** HTTP server spans and HTTP server metrics for the ActiveJ" instead
104+
of something like "This instrumentation **provides** HTTP server spans and HTTP server metrics for the ActiveJ".
105105
* Explicitly state whether the instrumentation generates new telemetry (spans, metrics, logs).
106106
* If it doesn't generate new telemetry, clearly explain what it's purpose is, for example whether it
107107
augments or enriches existing telemetry produced by other instrumentations (e.g., by adding
108108
attributes or ensuring context propagation).
109+
* When describing the functionality of the instrumentation and the telemetry, specify using
110+
[semantic convention categories](https://opentelemetry.io/docs/specs/semconv/) when possible
111+
(e.g., "database client spans", "RPC server metrics", "consumer messaging spans").
109112
* Do not include specific method names, class names, or other low-level implementation details in
110113
the description unless they are essential to understanding the purpose of the instrumentation.
111114
* It is not usually necessary to include specific library or framework version numbers in the
112115
description, unless that context is significant in some way.
113-
* When an instrumentation generates spans, be specific about the SpanKind (e.g., SERVER, CLIENT,
114-
PRODUCER, CONSUMER, INTERNAL).
115-
* Capitalize SpanKind values (e.g., SERVER, CLIENT) when used in descriptions.
116116

117117

118118
### Configurations

docs/instrumentation-list.yaml

Lines changed: 93 additions & 62 deletions
Large diffs are not rendered by default.

examples/distro/agent/build.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ CopySpec isolateClasses(Iterable<File> jars) {
4141
from(zipTree(it)) {
4242
into("inst")
4343
rename("^(.*)\\.class\$", "\$1.classdata")
44-
// Rename LICENSE file since it clashes with license dir on non-case sensitive FSs (i.e. Mac)
45-
rename("^LICENSE\$", "LICENSE.renamed")
44+
exclude("^LICENSE\$")
4645
exclude("META-INF/INDEX.LIST")
4746
exclude("META-INF/*.DSA")
4847
exclude("META-INF/*.SF")
@@ -66,9 +65,12 @@ tasks {
6665

6766
archiveFileName.set("javaagentLibs-relocated.jar")
6867

69-
// mergeServiceFiles requires that duplicate strategy is set to include
70-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
68+
duplicatesStrategy = DuplicatesStrategy.FAIL
7169
mergeServiceFiles()
70+
// mergeServiceFiles requires that duplicate strategy is set to include
71+
filesMatching("META-INF/services/**") {
72+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
73+
}
7274
exclude("**/module-info.class")
7375
relocatePackages(it)
7476

@@ -105,9 +107,12 @@ tasks {
105107

106108
archiveClassifier.set("all")
107109

108-
// mergeServiceFiles requires that duplicate strategy is set to include
109-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
110+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
110111
mergeServiceFiles("inst/META-INF/services")
112+
// mergeServiceFiles requires that duplicate strategy is set to include
113+
filesMatching("inst/META-INF/services/**") {
114+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
115+
}
111116

112117
exclude("**/module-info.class")
113118
relocatePackages(it)

examples/distro/gradle/instrumentation.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ dependencies {
3636
shadowJar {
3737
configurations = [project.configurations.runtimeClasspath, project.configurations.testInstrumentation]
3838

39-
// mergeServiceFiles requires that duplicate strategy is set to include
40-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
4139
mergeServiceFiles()
40+
// mergeServiceFiles requires that duplicate strategy is set to include
41+
filesMatching("inst/META-INF/services/**") {
42+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
43+
}
4244

4345
archiveFileName = 'agent-testing.jar'
4446

examples/distro/testing/agent-for-testing/build.gradle

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@ tasks {
6161

6262
archiveFileName.set("javaagentLibs-relocated.jar")
6363

64-
// mergeServiceFiles requires that duplicate strategy is set to include
65-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
64+
duplicatesStrategy = DuplicatesStrategy.FAIL
6665
mergeServiceFiles()
66+
// mergeServiceFiles requires that duplicate strategy is set to include
67+
filesMatching("META-INF/services/**") {
68+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
69+
}
70+
6771
exclude("**/module-info.class")
6872
relocatePackages(it)
6973

@@ -100,9 +104,12 @@ tasks {
100104

101105
archiveClassifier.set("")
102106

103-
// mergeServiceFiles requires that duplicate strategy is set to include
104-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
107+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
105108
mergeServiceFiles("inst/META-INF/services")
109+
// mergeServiceFiles requires that duplicate strategy is set to include
110+
filesMatching("inst/META-INF/services/**") {
111+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
112+
}
106113

107114
exclude("**/module-info.class")
108115
relocatePackages(it)

gradle-plugins/src/main/kotlin/io.opentelemetry.instrumentation.muzzle-check.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,18 @@ val shadowMuzzleBootstrap by tasks.registering(ShadowJar::class) {
7474
// this is a copied from io.opentelemetry.instrumentation.javaagent-shadowing for now at least to
7575
// avoid publishing io.opentelemetry.instrumentation.javaagent-shadowing publicly
7676
tasks.withType<ShadowJar>().configureEach {
77-
// mergeServiceFiles requires that duplicate strategy is set to include
78-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
7977
mergeServiceFiles()
78+
// mergeServiceFiles requires that duplicate strategy is set to include
79+
filesMatching("META-INF/services/**") {
80+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
81+
}
8082
// Merge any AWS SDK service files that may be present (too bad they didn't just use normal
8183
// service loader...)
8284
mergeServiceFiles("software/amazon/awssdk/global/handlers")
85+
// mergeServiceFiles requires that duplicate strategy is set to include
86+
filesMatching("software/amazon/awssdk/global/handlers/**") {
87+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
88+
}
8389

8490
exclude("**/module-info.class")
8591

instrumentation-docs/instrumentations.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ readonly INSTRUMENTATIONS=(
151151
"hibernate:hibernate-6.0:javaagent:testExperimental"
152152
"hibernate:hibernate-procedure-call-4.3:javaagent:test"
153153
"hibernate:hibernate-procedure-call-4.3:javaagent:testExperimental"
154+
"hystrix-1.4:javaagent:test"
155+
"hystrix-1.4:javaagent:testExperimental"
154156
)
155157

156158
# Some instrumentation test suites don't run ARM, so we use colima to run them in an x86_64
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
description: This instrumentation enables SERVER spans and metrics for the ActiveJ HTTP server.
1+
description: This instrumentation enables HTTP server spans and HTTP server metrics for the ActiveJ HTTP server.
22
library_link: https://activej.io/
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
description: This instrumentation enables CLIENT and SERVER spans and metrics for the Akka HTTP client and server.
1+
description: >
2+
This instrumentation enables HTTP client spans and metrics for the Akka HTTP client, and HTTP
3+
server spans and metrics for the Akka HTTP server.
24
library_link: https://doc.akka.io/docs/akka-http/current/index.html

0 commit comments

Comments
 (0)