Compare commits

...

755 Commits

Author SHA1 Message Date
Carl 4237a26517
added new constructor and tests (#7514) 2025-07-28 19:32:25 -07:00
renovate[bot] 590f11213c
chore(deps): update weekly update (#7515)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 19:26:58 -07:00
Jay DeLuca ff4d32646a
Update okhttp dependency to okhttp-jvm (#7517) 2025-07-28 19:26:15 -07:00
renovate[bot] 17b4065d6c
fix(deps): update dependency io.grpc:grpc-bom to v1.74.0 (#7518)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 13:37:37 -07:00
renovate[bot] b79242d858
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.59.2 (#7509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-26 22:06:51 -07:00
renovate[bot] dfd35c7a8d
fix(deps): update junit-framework monorepo to v5.13.4 (#7507)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-26 22:06:29 -07:00
renovate[bot] c0855e867a
fix(deps): update spotless packages to v7.2.1 (#7505)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-26 22:05:59 -07:00
renovate[bot] 5764814b8e
fix(deps): update dependency io.opentelemetry.contrib:opentelemetry-aws-xray-propagator to v1.48.0-alpha (#7510)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-26 11:21:35 -07:00
renovate[bot] 42c4091802
fix(deps): update errorproneversion to v2.41.0 (#7512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jason Plumb <jplumb@splunk.com>
2025-07-26 11:18:31 -07:00
Gregor Zeitlinger dc2874e2fa
fix typo (#7497) 2025-07-20 10:08:40 -07:00
renovate[bot] 352acfb24b
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.19.2 (#7504)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 17:44:36 -07:00
Gregor Zeitlinger 3e5368eba8
update kotlin (#7501)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 07:47:15 -07:00
Gregor Zeitlinger 80da2ab3d9
show the wrong file format (#7498) 2025-07-17 18:27:09 -07:00
renovate[bot] 29a7fe8f13
fix(deps): update dependency io.netty:netty-bom to v4.2.3.final (#7490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 15:16:47 -07:00
renovate[bot] 887778fa0b
fix(deps): update junit-framework monorepo to v5.13.3 (#7494)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 15:15:08 -07:00
renovate[bot] 8e232157d1
chore(deps): update plugin com.gradle.develocity to v4.1 (#7492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 12:23:37 -07:00
renovate[bot] b185cfb94f
fix(deps): update dependency com.gradle.develocity:com.gradle.develocity.gradle.plugin to v4.1 (#7493)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 12:23:10 -07:00
renovate[bot] 57580f56e5
fix(deps): update junit-framework monorepo to v5.13.2 (#7462)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jason Plumb <jplumb@splunk.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
2025-07-15 10:38:14 -07:00
Lauri Tulmin 7781706de2
Rename variables (#7486) 2025-07-15 10:37:27 -07:00
renovate[bot] ce1e26f579
fix(deps): update dependency org.snakeyaml:snakeyaml-engine to v2.10 (#7487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 09:04:30 -07:00
renovate[bot] 80094155e9
chore(deps): update python:3.13.5 docker digest to 28f60ab (#7485)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-13 19:12:22 -07:00
renovate[bot] 38207b740e
fix(deps): update prometheusserverversion to v1.3.10 (#7466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
2025-07-12 18:02:46 -07:00
renovate[bot] c54a301e5e
fix(deps): update errorproneversion to v2.40.0 (#7484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-12 15:48:41 -07:00
renovate[bot] 804d5f3a07
fix(deps): update errorproneversion to v2.39.0 (#7448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
2025-07-12 12:40:01 -07:00
otelbot[bot] 40f71ed52a
Update apidiff baseline and documentation versions to released version 1.52.0 (#7483)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-07-11 17:11:22 -05:00
otelbot[bot] 95dc35b2dd
Update version to 1.53.0 (#7481)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-07-11 15:40:05 -05:00
jack-berg 6cac14d649
Prepare for 1.52.0 release (#7478) 2025-07-11 13:34:51 -05:00
jack-berg 78a917da2e
Promote ComponentLoader to new opentelemetry-api-util, standardize SPI loading (#7446) 2025-07-10 17:29:25 -05:00
jack-berg 4821c37ec0
Add custom stacktrace renderer which is length limit aware (#7281) 2025-07-10 17:16:20 -05:00
jack-berg cecfb835be
Extend prometheus declarative config support to include without_scope_info, with_resource_constant_labels (#6840) 2025-07-10 17:10:00 -05:00
jack-berg 915c64a365
Add new convenience methods for converting DeclarativeConfigProperties to config model (#7453) 2025-07-10 17:05:24 -05:00
renovate[bot] de491791a4
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.59.1 (#7476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 16:23:27 -05:00
Gregor Zeitlinger 05f67023da
add scope schema URL and attributes to prom attributes (#7356)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2025-07-10 09:52:12 -05:00
renovate[bot] e949555a70
fix(deps): update dependency com.squareup.wire:wire-bom to v5.3.5 (#7477)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-09 07:56:31 -07:00
jack-berg d9c9583409
Add context and severity params to ExtendedLogger#isEnabled (#7268) 2025-07-08 17:00:08 -05:00
renovate[bot] 15ae8c0f35
fix(deps): update dependency com.squareup.wire:wire-bom to v5.3.4 (#7474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 08:00:30 -07:00
renovate[bot] 518623882b
fix(deps): update spotless packages to v7.1.0 (#7471)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 16:39:58 -07:00
renovate[bot] 7768b2d106
fix(deps): update dependency com.squareup.okhttp3:okhttp-bom to v5.1.0 (#7470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 16:38:57 -07:00
renovate[bot] e0fdeb3dae
fix(deps): update dependency io.opentelemetry.contrib:opentelemetry-aws-xray-propagator to v1.47.0-alpha (#7464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-05 09:31:42 -07:00
renovate[bot] ab078e0f35
chore(deps): update dependency gradle to v8.14.3 (#7465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 20:48:59 -07:00
renovate[bot] 9406936154
fix(deps): update dependency com.squareup.okhttp3:okhttp-bom to v5 (#7463)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-03 15:53:26 -07:00
renovate[bot] 85f662abfe
chore(deps): update weekly update (#7459)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-03 10:10:17 -07:00
renovate[bot] 317c00261b
chore(deps): update plugin com.gradleup.shadow to v8.3.8 (#7461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 09:17:51 -07:00
renovate[bot] 9db6f62129
fix(deps): update dependency com.squareup.okio:okio-bom to v3.15.0 (#7455)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 09:16:57 -07:00
renovate[bot] 0309b30c44
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.59.0 (#7444)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 10:58:42 -07:00
Trask Stalnaker 43f3f7d059
Standardize contributing section (#7456) 2025-06-30 17:51:30 -05:00
renovate[bot] 360897b98e
fix(deps): update dependency checkstyle to v10.26.1 (#7458)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 10:15:15 -07:00
renovate[bot] 6dd69e96e8
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.21.3 (#7457)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 19:06:15 -07:00
Dominic Lüchinger 50e3d4d949
docs: Update the version in the README.md to algin with the latest release (#7454) 2025-06-28 19:05:27 -07:00
Dominic Lüchinger 2c0ee00508
fix: Resolve environment variable substitution for mixed quotes (#7433) 2025-06-27 10:37:40 -05:00
Teja a7315c63b6
7181: Loading Compressor using ClassLoader configured through setServiceClassLoader (#7428) 2025-06-27 09:20:11 -05:00
OpenTelemetry Bot edd51d45a1
Fix outdated community membership link (#7450)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-26 16:08:39 -07:00
renovate[bot] e2e2dbbc26
fix(deps): update dependency net.ltgt.gradle:gradle-errorprone-plugin to v4.3.0 (#7449)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-26 12:17:50 -07:00
Jonathan Halliday b203d2f23e
profile exporters fix and test improvements (#7442) 2025-06-25 15:49:01 -05:00
OpenTelemetry Bot 6e8a466ca4
Update community member listings (#7447)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-25 14:12:29 -05:00
renovate[bot] 0ca502bddd
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.19.1 (#7422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 16:13:33 -05:00
Paul Nienaber 9329f8675e
fixes #7427: Patch LazyStorage to pass its ClassLoader to ServiceLoader (#7424) 2025-06-24 14:43:46 -05:00
jack-berg 9262a81432
Update to declarative config 1.0-rc.1 (#7436) 2025-06-24 14:42:53 -05:00
Trask Stalnaker 11e424de8d
Slightly faster CodeQL (#7414)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2025-06-24 14:42:42 -05:00
Tyler Benson aeb08f40a0
Propagate flush to PeriodicMetricReader's metricExporter. (#7410) 2025-06-24 14:42:28 -05:00
Francesco Andreuzzi b0a9deb7d8
Fix race condition of `GlobalOpenTelemetry` initialization with `AutoConfiguredOpenTelemetrySdkBuilder` (#7365)
Co-authored-by: Jack Berg <jberg@newrelic.com>
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2025-06-24 14:22:10 -05:00
renovate[bot] 76913bb224
fix(deps): update dependency checkstyle to v10.26.0 (#7443)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 11:20:22 -07:00
renovate[bot] 55a1b57644
chore(deps): update plugin com.gradleup.shadow to v8.3.7 (#7439)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 11:17:33 -07:00
renovate[bot] bf65026b71
chore(deps): update weekly update (#7423)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-23 09:14:58 -07:00
renovate[bot] fa31e52722
fix(deps): update dependency checkstyle to v10.25.1 (#7437)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-23 09:12:39 -07:00
jason plumb ada5af60d1
Prevent major version bump in equalsverifier. (#7416) 2025-06-20 14:47:56 -05:00
renovate[bot] 2eb84bf417
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.21.2 (#7431)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-18 20:30:40 -07:00
renovate[bot] d90cf44c87
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.58.2 (#7426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-18 20:30:17 -07:00
renovate[bot] cc2844d867
fix(deps): update dependency com.squareup.okio:okio-bom to v3.13.0 (#7421)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-13 18:13:46 -07:00
jason plumb 07f01c363f
ContextKey update example code (#7420) 2025-06-13 18:11:43 -07:00
Trask Stalnaker 3f73f12f83
Update sonatype snapshot repo location (#7411) 2025-06-12 18:09:35 -05:00
renovate[bot] fe315a3a23
fix(deps): update dependency org.owasp:dependency-check-gradle to v12.1.3 (#7417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 07:51:44 -07:00
renovate[bot] f9dc916a80
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.34.0-alpha (#7413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 07:51:09 -07:00
renovate[bot] 4a33b66996
fix(deps): update dependency org.owasp:dependency-check-gradle to v12.1.2 (#7409)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 18:33:56 -07:00
jack-berg d5a2fa2bda
Cleanup test resources to quiet logs (#7387) 2025-06-09 16:28:47 -05:00
Felix Barnsteiner 6a164a9a36
fix(httpclient): ensure proper closure of HttpClient in shutdown method (#7390) 2025-06-09 13:34:36 -05:00
Trask Stalnaker 67e3f7baf0
Reduce repo settings we need to doc (#7397) 2025-06-09 13:16:31 -05:00
Trask Stalnaker e35ba16e55
Fix workflow permission (#7408) 2025-06-09 09:38:09 -05:00
Trask Stalnaker 289bebaf15
Fix benchmark workflows (#7406) 2025-06-09 09:37:46 -05:00
Nan Chen 7a4a452603
Update argument name for set(long value) (#7405) 2025-06-06 16:52:42 -05:00
jason plumb 5a25bb6fe1
Update repos for sonatype central (#7407) 2025-06-06 16:50:05 -05:00
jack-berg 07e8d434f3
Fix prepare-release-branch.sh interaction with update-version.sh (#7404) 2025-06-06 14:39:08 -05:00
OpenTelemetry Bot d37f6bd93a
Use more specific self-hosted runner name (#7399)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-06 14:38:48 -05:00
otelbot[bot] e25b776840
Update apidiff baseline to released version 1.51.0 (#7403)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-06 14:38:35 -05:00
otelbot[bot] c34a25efd5
Update version to 1.52.0-SNAPSHOT (#7401)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-06-06 13:27:30 -05:00
jack-berg d034464ffd
Prepare for 1.51.0 release (#7396) 2025-06-06 11:46:10 -05:00
renovate[bot] f2f29f5976
fix(deps): update prometheusserverversion to v1.3.8 (#7367)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-06-06 09:29:48 -05:00
jack-berg 8ed10f2ad7
OTLP exporter should tolerate instances of LogRecordData when incubator is present (#7393) 2025-06-06 09:23:58 -05:00
Gregor Zeitlinger 5e50aa7ee6
prom exporter: exclude shaded protobuf (#7355)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-06-05 17:12:45 -05:00
renovate[bot] cb92d970d4
chore(deps): update dependency gradle to v8.14.2 (#7394)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 17:08:36 -05:00
renovate[bot] 5fada737bf
fix(deps): update dependency com.squareup.wire:wire-bom to v5.3.3 (#7395)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 17:05:28 -05:00
renovate[bot] c874197d64
chore(config): migrate renovate config (#7351)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2025-06-05 16:57:54 -05:00
renovate[bot] d41c099e62
chore(deps): update weekly update (#7352)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 16:57:05 -05:00
renovate[bot] 9e76c90a04
fix(deps): update dependency io.netty:netty-bom to v4.2.2.final (#7389)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 16:40:43 -05:00
renovate[bot] 93d9e7278f
fix(deps): update dependency io.opentelemetry.proto:opentelemetry-proto to v1.7.0-alpha (#7362)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-06-05 11:20:40 -05:00
jack-berg b11316b0bd
Configurable exception.* attribute resolution (#7266) 2025-06-05 11:20:14 -05:00
renovate[bot] a756317511
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.58.0 (#7384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 17:15:48 -05:00
renovate[bot] 3b596aae1b
fix(deps): update dependency io.zipkin.brave:brave-bom to v6.3.0 (#7385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 17:15:35 -05:00
Onur Kayabasi d239b7017d
Prometheus label conversion refactored to align with spec (#7291)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-06-03 17:06:21 -05:00
Jonas Kunz f7207352a1
Implement new SemConv exporter health metrics (#7265)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-06-03 16:40:38 -05:00
renovate[bot] 2c762e0be8
fix(deps): update dependency checkstyle to v10.25.0 (#7383)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:34:05 -05:00
renovate[bot] dfbea872b1
fix(deps): update dependency com.squareup.wire:wire-bom to v5.3.2 (#7382)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:33:51 -05:00
renovate[bot] fd93c2b8c4
fix(deps): update dependency com.squareup.okio:okio-bom to v3.12.0 (#7372)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:33:36 -05:00
renovate[bot] ba37bf1a69
fix(deps): update spotless packages to v7.0.4 (#7371)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:10:06 -05:00
renovate[bot] 6982730ffb
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.21.1 (#7377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:08:57 -05:00
Kevin Burke f94b056f83
sdk-extensions: remove 'Visible for test' comment (#7381) 2025-06-03 14:08:41 -05:00
renovate[bot] 5898a425c5
fix(deps): update dependency io.zipkin.reporter2:zipkin-reporter-bom to v3.5.1 (#7379)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:06:55 -05:00
renovate[bot] afe3440e91
fix(deps): update dependency com.google.protobuf:protobuf-bom to v4.31.1 (#7375)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:06:38 -05:00
renovate[bot] 53b1f7c624
fix(deps): update dependency io.grpc:grpc-bom to v1.73.0 (#7370)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 14:06:19 -05:00
Robert Niedziela 90e030f213
Handle instrumentation node changes in yaml config file format 0.4 (#7357) 2025-05-27 17:34:26 -05:00
renovate[bot] 03e7f98965
chore(deps): update plugin com.gradle.develocity to v4.0.2 (#7368)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-27 12:21:34 -07:00
renovate[bot] 145ceaa94c
fix(deps): update dependency com.gradle.develocity:com.gradle.develocity.gradle.plugin to v4.0.2 (#7369)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-27 12:21:04 -07:00
renovate[bot] 6153023d98
chore(deps): update dependency gradle to v8.14.1 (#7364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-23 09:51:54 -07:00
renovate[bot] 04fc212451
fix(deps): update dependency checkstyle to v10.24.0 (#7361)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-23 09:51:34 -07:00
renovate[bot] cc7d0855e7
chore(deps): update weekly update (#7306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-15 16:42:07 -05:00
renovate[bot] 452464820a
fix(deps): update dependency com.google.protobuf:protobuf-bom to v4.31.0 (#7350)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-15 16:41:52 -05:00
Alex Brown deeceebe8d
Run JDK HTTP sender on non-daemon threads. (#7322)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-05-15 16:12:25 -05:00
OpenTelemetry Bot 6bd13ffcbc
Update Renovate configuration (#7345)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-05-15 15:47:24 -05:00
renovate[bot] 3c1f556831
fix(deps): update prometheusserverversion to v1.3.7 (#7348)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-05-15 15:34:54 -05:00
renovate[bot] 4c6ba0aed1
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.57.0 (#7349)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-15 14:56:09 -05:00
renovate[bot] d698c1d326
fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.1.21 (#7347)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-15 14:54:55 -05:00
Trask Stalnaker 3219437316
Fix release workflow (#7341) 2025-05-15 14:37:01 -05:00
Jonathan Halliday bed02d5f61
Add gRPC export for profiles signal type. (#7301)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-05-13 10:53:53 -05:00
jack-berg 394cd354a3
Post release 1.50.0 (#7344) 2025-05-13 10:22:30 -05:00
Laurent Tréguier e419b5d588
Fix context storage provider property name (#7318) (#7342) 2025-05-11 09:55:11 -07:00
otelbot[bot] acc64ee012
Update version to 1.51.0 (#7338)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-05-09 17:58:04 -05:00
jack-berg e8305ee3f5
Prepare 1.50.0 (#7335) 2025-05-09 09:52:01 -05:00
Francesco Andreuzzi 983133fd0d
Add `setLoggerConfigurator` support to `LoggerProvider` (#7332) 2025-05-09 09:14:27 -05:00
jason plumb 58acb531c5
Add test that shows how context keys are special (#7330) 2025-05-08 16:26:53 -05:00
renovate[bot] 18548f47ad
fix(deps): update dependency com.tngtech.archunit:archunit-junit5 to v1.4.1 (#7331)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-08 16:25:31 -05:00
renovate[bot] f0f263031a
fix(deps): update dependency io.netty:netty-bom to v4.2.1.final (#7324)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-08 16:25:21 -05:00
Alex Brown 288907d349
Avoid HTTP 429 errors (#7328) 2025-05-08 16:25:08 -05:00
jack-berg eec21201b1
Add DeclarativeConfigContext (#7293) 2025-05-06 14:19:33 -05:00
jack-berg 54e5ea7bf2
Update cralwer to crawl all io.opentelemetry.* groups (#7316) 2025-05-06 14:19:18 -05:00
jack-berg d70fe5b029
Fix Otlp*MetricExporterBuilderTests (#7313) 2025-05-06 14:19:01 -05:00
renovate[bot] 5bda810da8
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.19.4 (#7311)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 19:25:14 -07:00
renovate[bot] 39ba216f00
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.56.0 (#7320)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 19:24:43 -07:00
renovate[bot] 804714d28e
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.55.3 (#7317)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 08:00:04 -07:00
Francesco Andreuzzi 7cbcdd65b6
Spatial aggregation for async instruments with filtering views (#7264)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-05-02 16:50:30 -05:00
Jay DeLuca 4aeb2f79be
Javadoc site crawler (#7300) 2025-05-02 15:55:13 -05:00
renovate[bot] 29523e62ea
fix(deps): update dependency com.uber.nullaway:nullaway to v0.12.7 (#7310) 2025-04-30 06:32:55 -07:00
renovate[bot] 3ef4be2d84
fix(deps): update dependency ru.vyarus:gradle-animalsniffer-plugin to v2.0.1 (#7308)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 19:30:33 -07:00
renovate[bot] 56ae62e2d6
chore(deps): update dependency gradle to v8.14 (#7304)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 19:30:07 -07:00
renovate[bot] 2e59170339
fix(deps): update dependency checkstyle to v10.23.1 (#7305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 19:29:23 -07:00
renovate[bot] e2a5d20955
fix(deps): update dependency io.zipkin.brave:brave-bom to v6.2.0 (#7307)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 15:32:45 -07:00
renovate[bot] 33a1a9e5fe
fix(deps): update dependency com.gradle.develocity:com.gradle.develocity.gradle.plugin to v4.0.1 (#7303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 15:32:02 -07:00
renovate[bot] eb14ef665e
chore(deps): update plugin com.gradle.develocity to v4.0.1 (#7302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 13:13:28 -07:00
renovate[bot] d114161694
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.19.0 (#7299)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 13:09:48 -07:00
renovate[bot] 8c1e348fb8
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.21.0 (#7296)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-26 18:17:31 -07:00
renovate[bot] beb5917939
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.55.2 (#7295)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-26 18:16:53 -07:00
renovate[bot] b8d9c027fd
fix(deps): update errorproneversion to v2.38.0 (#7285)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-04-24 11:31:16 -05:00
Tyler Benson b468a2e9bf
Allow Otlp*MetricExporter's to publish export stats (#7255) 2025-04-21 17:35:41 -05:00
renovate[bot] 2460c92400
chore(deps): update actions/create-github-app-token action to v2 (#7288)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 17:28:25 -05:00
renovate[bot] 86b7e76082
chore(deps): update weekly update (#7287)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 17:09:53 -05:00
renovate[bot] 5c4a0ad78f
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.55.0 (#7286)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-18 20:47:36 -07:00
Onur Kayabasi 8fda429ae6
Sdk builders extended with addProcessorFirst methods (#7243) 2025-04-18 16:16:29 -05:00
jack-berg 9e3f702d5b
Declarative config 0.4 (#7064) 2025-04-18 14:20:38 -05:00
renovate[bot] 04677f93b3
fix(deps): update dependency net.ltgt.gradle:gradle-errorprone-plugin to v4.2.0 (#7284)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-17 13:34:58 -05:00
renovate[bot] 349052c34d
fix(deps): update dependency io.grpc:grpc-bom to v1.72.0 (#7278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-17 13:32:39 -05:00
jack-berg 9e1e9c6e9f
Stabilize log record event name (#7277) 2025-04-17 12:30:43 -05:00
Jonas Kunz 65472798f6
Fix OTLP metric exporter toBuilder() loosing temporality (#7280) 2025-04-17 11:39:35 -05:00
jack-berg f17b8b0414
Update maven badge to new host (#7283) 2025-04-16 16:53:47 -05:00
renovate[bot] e392b11bbf
fix(deps): update armeriaversion to v1.32.5 (#7275)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-16 13:05:54 -05:00
jack-berg 4e457f75a8
Fix link checker (#7282) 2025-04-16 13:03:44 -05:00
Tyler Benson d13f04d084
Clarify that AttributesBuilder.put allows nulls (#7271) 2025-04-16 11:08:03 -05:00
Trask Stalnaker 14e2fefe7a
Switch to otelbot and streamline post release process (#7273) 2025-04-15 14:22:19 -05:00
jack-berg ccfcecf8fe
Promote getAll to TextMapGetter stable API (#7267) 2025-04-15 12:38:07 -05:00
renovate[bot] 8a998225d0
fix(deps): update dependency com.google.guava:guava-bom to v33.4.8-jre (#7274)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-14 19:42:13 -07:00
renovate[bot] a01bf6cfd0
fix(deps): update junit5 monorepo to v5.12.2 (#7269)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-11 15:31:53 -05:00
renovate[bot] 0191a01b3b
fix(deps): update dependency io.opentelemetry.contrib:opentelemetry-aws-xray-propagator to v1.46.0-alpha (#7270)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-11 14:41:21 -05:00
Trask Stalnaker e695b66950
Add FOSSA badges (#7094) 2025-04-11 14:15:09 -05:00
renovate[bot] 563087f0f0
chore(deps): update weekly update (#7218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-11 10:59:57 -05:00
renovate[bot] 00fbeb2695
chore(deps): update plugin com.gradle.develocity to v4 (#7260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-11 10:59:33 -05:00
renovate[bot] 6855cd3143
fix(deps): update armeriaversion to v1.32.4 (#7257)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-11 10:59:14 -05:00
renovate[bot] 5d3ae0199f
fix(deps): update dependency com.gradle.develocity:com.gradle.develocity.gradle.plugin to v4 (#7261)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-11 10:58:46 -05:00
jack-berg dc0b4acd86
Add support for escaping declarative config env var substitution (#7033) 2025-04-11 10:46:59 -05:00
jack-berg 2d1c14ee56
Add experimental support for log extended attributes (#7123) 2025-04-11 10:46:38 -05:00
Teja 9cb636502e
6195: DelegatingMetricData. (#7229)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2025-04-11 09:20:03 -05:00
jack-berg 4e243f2b63
Add ExtendedLogRecordBuilder#setException (#7182) 2025-04-11 09:18:19 -05:00
renovate[bot] d7fb208d06
fix(deps): update dependency com.google.guava:guava-bom to v33.4.7-jre (#7259)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 14:20:26 -05:00
renovate[bot] 1f5a560fbb
fix(deps): update dependency com.squareup.okio:okio-bom to v3.11.0 (#7263)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 14:20:09 -05:00
renovate[bot] 58bf4e4018
fix(deps): update spotless packages to v7.0.3 (#7256)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 14:19:52 -05:00
jack-berg a8493271bc
Update min kotlin version to 1.8 (#7155) 2025-04-10 14:18:44 -05:00
jack-berg 00b61a2d87
Remove guava dependency from buildSrc/build.gradle.kts (#7262) 2025-04-09 13:00:15 -05:00
jack-berg 10eda198c0
Remove Java9VersionSpecific clock implementation (#7221) 2025-04-07 16:50:55 -05:00
renovate[bot] aa17528ec1
fix(deps): update dependency org.owasp:dependency-check-gradle to v12.1.1 (#7252)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-07 16:48:52 -05:00
OpenTelemetry Bot 688e1031c6
Post release for version 1.49.0 (#7254) 2025-04-07 11:29:32 -05:00
Onur Kayabasi 7f86458580
Fix duplicated ExecutorService wrap (#7245) 2025-04-07 10:34:28 -05:00
Onur Kayabasi 3eb7ef00ad
Authenticator added for PrometheusHttpServer (#7225) 2025-04-07 10:32:52 -05:00
OpenTelemetry Bot f801a159f3
Update version to 1.50.0 (#7249) 2025-04-04 15:20:35 -05:00
jack-berg b3126023db
Prepare for 1.49.0 release (#7248) 2025-04-04 14:14:04 -05:00
renovate[bot] 233e111a09
fix(deps): update dependency io.netty:netty-bom to v4.2.0.final (#7244)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-04 11:53:05 -05:00
renovate[bot] 4ecc0becfd
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.19.3 (#7247)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-04 11:50:59 -05:00
renovate[bot] 184090914e
fix(deps): update dependency jacoco to v0.8.13 (#7241)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-02 15:39:40 -05:00
renovate[bot] 8fe071afee
fix(deps): update errorproneversion to v2.37.0 (#7211)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-04-02 15:33:01 -05:00
renovate[bot] a7e92dfe81
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.32.0-alpha (#7240)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-02 14:22:51 -05:00
renovate[bot] dc44948c4f
fix(deps): update dependency checkstyle to v10.23.0 (#7237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-02 14:22:33 -05:00
renovate[bot] a48b48fa29
fix(deps): update dependency com.google.protobuf:protobuf-bom to v4.30.0 (#7173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-04-02 14:04:24 -05:00
renovate[bot] e34049b74e
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.31.0-alpha (#7234)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 18:27:58 -07:00
jack-berg 1500b0f3ba
Fix jmh link (#7233) 2025-04-01 14:56:22 -05:00
jack-berg 0c6a04710b
Remove armeria log decorator to clean up build logs (#7232) 2025-04-01 11:29:49 -05:00
renovate[bot] 22acb3e8ec
fix(deps): update dependency checkstyle to v10.22.0 (#7228)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-30 17:48:44 -07:00
renovate[bot] f2f990c81d
fix(deps): update dependency com.uber.nullaway:nullaway to v0.12.6 (#7224)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-29 12:29:01 -07:00
Lauri Tulmin e46742d944
Don't initialize DeclarativeConfiguration in incubator available test (#7227) 2025-03-28 11:17:29 -05:00
jack-berg 2cf5f0128b
Fix declarative config xray todo (#7226) 2025-03-27 13:30:24 -05:00
Anton Rybochkin e6f90f58ce
Avoid linear queue.size() calls in span producers by storing queue size separately (#7141)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2025-03-26 17:21:13 -05:00
renovate[bot] 9698d24fdf
fix(deps): update dependency com.google.guava:guava-bom to v33.4.6-jre (#7223)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-26 17:20:13 -05:00
jack-berg 526137fd64
Add more attribute advice tests to show interaction with views (#7143) 2025-03-25 20:24:19 -07:00
renovate[bot] 7b732c8498
fix(deps): update dependency com.google.guava:guava to v33.4.6-jre (#7222)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-25 20:21:42 -07:00
renovate[bot] a1fed61742
fix(deps): update dependency com.google.guava:guava-bom to v33.4.5-jre (#7213)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-03-25 16:33:03 -07:00
Yuriy Holinko 3c12e3af1a
Refine delay jitter for exponential backoff (#7206) 2025-03-25 11:20:12 -05:00
renovate[bot] 9e0efd4267
fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.1.20 (#7215)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-22 15:12:43 -07:00
renovate[bot] cc7b268cec
fix(deps): update dependency com.google.guava:guava to v33.4.5-jre (#7212)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-22 15:12:27 -07:00
renovate[bot] 3ac1f9f695
fix(deps): update dependency com.toasttab.android:gummy-bears-api-23 to v0.12.0 (#7204)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-22 15:12:09 -07:00
renovate[bot] 747368a94b
fix(deps): update armeriaversion to v1.32.3 (#7197)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-22 15:07:47 -07:00
Gregor Zeitlinger 000fd0f209
add config model customizer (#7118)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2025-03-21 12:40:16 -05:00
renovate[bot] 9172089ab9
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.19.2 (#7202)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-21 07:44:54 -07:00
renovate[bot] 9b596d03d1
fix(deps): update junit5 monorepo to v5.12.1 (#7203)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-21 07:41:31 -07:00
renovate[bot] 9c1b9f609f
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.54.1 (#7198)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 10:13:02 -07:00
jack-berg 09bac7d077
Stable cardinality limit property otel.java.metrics.cardinality.limit (#7199) 2025-03-17 09:44:49 -05:00
jack-berg 490173b0da
Remove support for otel.experimental.exporter.otlp.retry.enabled (#7200) 2025-03-14 13:51:46 -05:00
jack-berg 0673fcfda5
Add support for setting OTLP exporter executor service (#7152) 2025-03-13 11:53:19 -05:00
renovate[bot] a3dd67739a
chore(deps): update plugin org.graalvm.buildtools.native to v0.10.6 (#7193)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-12 09:53:45 -05:00
renovate[bot] d0848e3351
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.54.0 (#7192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-12 09:53:26 -05:00
renovate[bot] d511a28df9
chore(deps): update github/codeql-action action to v3.28.11 (#7189)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 11:18:12 -05:00
OpenTelemetry Bot 708244ec48
Post release for version 1.48.0 (#7190) 2025-03-10 10:55:16 -05:00
renovate[bot] 9d4f61ad0b
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.18.3 (#7162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 09:36:10 -05:00
OpenTelemetry Bot 974653fe66
Update version to 1.49.0 (#7186) 2025-03-07 16:47:00 -06:00
jack-berg 2e4f9ede58
Prepare for 1.48.0 release (#7183)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2025-03-07 10:03:15 -06:00
jack-berg 8efade69a1
Extract sender parameters to config carrier class (#7151) 2025-03-06 11:57:46 -06:00
renovate[bot] 4d34b53e0c
fix(deps): update dependency com.squareup.wire:wire-bom to v5.3.1 (#7177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-05 09:51:29 -06:00
renovate[bot] 0de9fc084d
fix(deps): update armeriaversion to v1.32.0 (#7174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-05 09:50:44 -06:00
chukun 1b1d537375
Reduce warning log about maxExportBatchSize. (#7148) 2025-03-05 09:50:22 -06:00
jack-berg 42056f57c8
Introduce ConfigProvider API (#6549) 2025-03-04 17:21:19 -06:00
renovate[bot] b3e3fff83c
chore(deps): update weekly update (#7163)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 16:59:28 -06:00
renovate[bot] cd86405148
fix(deps): update dependency checkstyle to v10.21.4 (#7166)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 16:56:30 -06:00
renovate[bot] 33b37abe9a
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.20.6 (#7170)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 16:56:12 -06:00
renovate[bot] 0618791928
fix(deps): update dependency io.grpc:grpc-bom to v1.71.0 (#7171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 16:55:57 -06:00
jack-berg 5015698d2b
Remove obsolete SdkMeterProviderUtil#setCardinalitylimit API (#7169) 2025-03-04 16:49:05 -06:00
jack-berg 3c71b798a5
Test with graalvm 23 (#7167) 2025-03-04 12:46:56 -06:00
jack-berg 0a993b392c
Update android animalsniffer min API version to 23 (#7153) 2025-03-04 09:47:13 -06:00
tianlan xu 16f3637b0b
fix bug: throttledRateLimiter is not once per minute, but five times (#7156) 2025-03-03 17:01:53 -06:00
jack-berg dc46ccd2c9
Add support for setting OTLP exporter service class loader (#7150) 2025-03-03 17:01:10 -06:00
renovate[bot] d1ce438e00
fix(deps): update dependency com.uber.nullaway:nullaway to v0.12.4 (#7158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-28 16:04:13 -08:00
renovate[bot] 173e80b9c2
chore(deps): update dependency gradle to v8.13 (#7145)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-28 16:03:43 -08:00
renovate[bot] 3dd7134f81
fix(deps): update dependency com.android.tools:desugar_jdk_libs to v2.1.5 (#7144)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-28 09:10:44 -08:00
jack-berg cd1f61725c
Suppress a variety of noisy test logs (#7154) 2025-02-27 10:57:03 -06:00
renovate[bot] 313d391e55
fix(deps): update slf4j monorepo to v2.0.17 (#7146)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 17:17:18 -06:00
renovate[bot] 865c89f47d
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.53.0 (#7147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 17:17:00 -06:00
renovate[bot] 5a10b685d4
fix(deps): update dependency io.netty:netty-bom to v4.1.119.final (#7149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 17:16:40 -06:00
jack-berg 3d3bff5bda
Fix bug preventing accurate reporting of dropped attribute count (#7142) 2025-02-26 16:26:59 -06:00
chukun 31f484f39f
#6454 log warning and adjust maxExportBatchSize when exceeds maxQueueSize. (#7045)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-02-25 12:00:37 -06:00
renovate[bot] 2de5a2c484
fix(deps): update dependency org.awaitility:awaitility to v4.3.0 (#7131)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 14:22:38 -06:00
renovate[bot] 9f5b67b3c3
fix(deps): update junit5 monorepo to v5.12.0 (#7132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 14:22:22 -06:00
renovate[bot] 80af8a33a0
fix(deps): update dependency checkstyle to v10.21.3 (#7138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 14:21:58 -06:00
renovate[bot] c91f56ece8
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.20.5 (#7124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 14:21:29 -06:00
renovate[bot] f33cba3b1d
fix(deps): update prometheusserverversion to v1.3.6 (#7107)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-02-24 11:15:47 -06:00
Trask Stalnaker b5daeb0871
Fix otlp logging exporter test to be more realistic (#7136) 2025-02-24 10:24:08 -06:00
renovate[bot] 3c77016788
chore(deps): update weekly update (#7114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 10:23:07 -06:00
jason plumb ee731aabd3
Add some helpful logging attribute methods (#7089)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2025-02-24 10:13:35 -06:00
jack-berg 56941a5ba6
Remove support for otel.java.experimental.exporter.memory_mode (#7127) 2025-02-21 10:13:57 -06:00
jack-berg 37969926d1
Disable owasp dependency check on :custom-checks (#7128) 2025-02-20 15:58:18 -06:00
Trask Stalnaker 0465c79151
Fix OWASP dependency check workflow (#7126) 2025-02-20 11:19:22 -06:00
Trask Stalnaker 5879f48dc8
Fix OWASP dependency check workflow (#7115) 2025-02-19 09:57:55 -06:00
renovate[bot] f937eff1ee
chore(deps): update plugin com.gradle.develocity to v3.19.2 (#7120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 18:52:21 -08:00
renovate[bot] 5b93c08eed
fix(deps): update dependency com.gradle.develocity:com.gradle.develocity.gradle.plugin to v3.19.2 (#7121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 16:36:32 -08:00
renovate[bot] a9d7f1ebda
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.19.1 (#7117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 16:35:36 -08:00
renovate[bot] d08c5030d3
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.30.0-alpha (#7122)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 18:12:09 -06:00
renovate[bot] 3f3b42483a
fix(deps): update dependency org.owasp:dependency-check-gradle to v12.1.0 (#7113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 14:41:25 -08:00
renovate[bot] 8ed2e0c79f
fix(deps): update dependency io.zipkin.reporter2:zipkin-reporter-bom to v3.5.0 (#7112)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 14:30:19 -08:00
renovate[bot] d69ea6c37d
fix(deps): update dependency io.zipkin.brave:brave-bom to v6.1.0 (#7111)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 12:52:27 -08:00
renovate[bot] ca6fa4e801
fix(deps): update dependency me.champeau.gradle:japicmp-gradle-plugin to v0.4.6 (#7110)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 12:51:51 -08:00
renovate[bot] 41e54f7481
fix(deps): update dependency com.squareup.wire:wire-bom to v5.3.0 (#7108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-18 12:45:11 -08:00
jack-berg fe73fb737a
Retry tests in CI (#7106) 2025-02-18 09:58:58 -06:00
Trask Stalnaker 3d3355305b
Add FOSSA team (#7104) 2025-02-18 09:58:16 -06:00
Trask Stalnaker e47963612e
Convert branch protections to rule sets (#7095) 2025-02-18 09:57:55 -06:00
Trask Stalnaker 3e1d9536f8
Less frequent Renovate (#7102) 2025-02-11 20:54:30 -08:00
Trask Stalnaker 43fba2e984
Update from ubuntu-20.04 (#7100) 2025-02-11 15:01:57 -06:00
Trask Stalnaker b56b10ff57
Another CLOMonitor exemption (#7096) 2025-02-11 15:01:23 -06:00
renovate[bot] 27d863375b
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.52.0 (#7097)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 18:27:11 -08:00
renovate[bot] c285def1d9
fix(deps): update dependency com.tngtech.archunit:archunit-junit5 to v1.4.0 (#7098)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 18:26:46 -08:00
renovate[bot] 8e71517fdb
fix(deps): update dependency io.netty:netty-bom to v4.1.118.final (#7093)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 18:26:11 -08:00
Trask Stalnaker 768e789160
Renovate best practices (#7069) 2025-02-10 12:37:51 -06:00
Trask Stalnaker 517893e817
Add FOSSA license scanning (#7090) 2025-02-10 12:34:29 -06:00
Trask Stalnaker c77e66475a
Add OSSF scorecard badge (#7073) 2025-02-10 12:33:19 -06:00
jack-berg 00f00433f3
Continue limiting workflow permissions (#7092) 2025-02-10 11:40:56 -06:00
StepSecurity Bot 06449488ce
[StepSecurity] Apply security best practices (#7088)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2025-02-10 10:31:39 -06:00
renovate[bot] 92b089ab2c
chore(deps): update github/codeql-action action to v3.28.9 (#7081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-09 14:42:14 -08:00
Trask Stalnaker 89a830cfb4
Add CLOMonitor exemption for Artifact Hub badge (#7091) 2025-02-09 11:06:49 -08:00
OpenTelemetry Bot 867bb1f24e
Post release for version 1.47.0 (#7087) 2025-02-07 14:26:00 -06:00
Trask Stalnaker 5b1e444980
Always run gradle wrapper validation (#7071) 2025-02-07 14:21:19 -06:00
Trask Stalnaker d22baecc95
Restrict token permissions (#7072) 2025-02-07 14:21:04 -06:00
Trask Stalnaker 41c51a052c
Run CodeQL on PRs (#7070) 2025-02-07 14:20:41 -06:00
OpenTelemetry Bot bd6b974e99
Update version to 1.48.0 (#7084) 2025-02-07 13:34:44 -06:00
jack-berg 355d17ffaa
Prepare 1.47.0 (#7078) 2025-02-07 13:14:54 -06:00
renovate[bot] 19650df469
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.19 (#7055)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 13:14:05 -06:00
renovate[bot] a17dcd531d
fix(deps): update dependency me.champeau.jmh:jmh-gradle-plugin to v0.7.3 (#7054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 13:13:54 -06:00
renovate[bot] e075cc157c
chore(deps): update plugin org.graalvm.buildtools.native to v0.10.5 (#7066)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 09:37:06 -06:00
renovate[bot] 22b6fea9ea
chore(deps): update gradle/actions action to v4.3.0 (#7060)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 09:36:25 -06:00
renovate[bot] ab24130dcb
chore(deps): update plugin com.gradleup.shadow to v8.3.6 (#7063)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 09:36:06 -06:00
Michael Blum a5739eba19
Spec compliance: OTEL_PROPAGATORS should still work when OTEL_SDK_DISABLED (#7062) 2025-02-07 09:34:36 -06:00
Emile de Weerd d16cad3f73
feat(sdk-testing): Add W3CBaggagePropagator to test utils (#7056) 2025-02-07 09:20:44 -06:00
Trask Stalnaker 2fcd5f5bf8
Add OSSF Scorecard code scanning (#7067) 2025-02-06 16:40:51 -06:00
Trask Stalnaker 9f0a29124e
Reduce codecov target from 90 to 89 (#7077) 2025-02-06 13:02:12 -06:00
renovate[bot] cb64451c72
fix(deps): update dependency org.owasp:dependency-check-gradle to v12.0.2 (#7061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-01 17:45:10 -08:00
jack-berg 045c3e65d6
Promote EnvironmentResourceProvider to public API (#7052) 2025-01-31 09:19:22 -06:00
Yuriy Holinko 19e964a636
Expand OkHttp default retry exception predicate with SocketException (#7057) 2025-01-30 15:51:01 -06:00
jack-berg bf71be17d4
Drop event API / SDK (#7053) 2025-01-30 15:39:47 -06:00
jackshirazi 8e31bf4f28
add SdkTracerProvider.setScopeConfigurator() and support (#7021)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-01-29 09:59:41 -06:00
renovate[bot] 05bf32c5df
fix(deps): update dependency checkstyle to v10.21.2 (#7043)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 09:59:13 -06:00
renovate[bot] df425b684a
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.51.0 (#7048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 09:58:59 -06:00
renovate[bot] f8836deff7
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.30.0-alpha-rc.1 (#7049)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 09:58:40 -06:00
renovate[bot] d7962af43e
fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.1.10 (#7050)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 09:58:23 -06:00
Onur Kayabasi c4412f2070
Follow spec on span limits, batch processors (#7030) 2025-01-28 16:41:02 -06:00
jack-berg 1c1d56113d
Expand OkHttp retry exception predicate (#7047) 2025-01-28 10:37:00 -06:00
renovate[bot] 5e1a3979b6
fix(deps): update dependency ru.vyarus:gradle-animalsniffer-plugin to v2 (#7042)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-26 11:23:59 -08:00
renovate[bot] 070aedcf58
chore(deps): update dependency gradle to v8.12.1 (#7040)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 15:04:34 -06:00
Yuriy Holinko d2b8497de0
Retry on configurable exception (#6991) 2025-01-24 15:01:53 -06:00
jack-berg cd3b0e7f9d
Fix concurrent span reusable data marshaler (#7041)
Co-authored-by: Robert Elliot <rob@lidalia.org.uk>
2025-01-24 15:01:21 -06:00
renovate[bot] 85b99e94f9
chore(deps): update plugin com.gradle.develocity to v3.19.1 (#7037)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 14:20:14 -06:00
Jonathan Halliday 013d1669fa
Improve profiles attribute table handling (#7031) 2025-01-24 14:20:03 -06:00
renovate[bot] b4fec0573b
fix(deps): update dependency org.assertj:assertj-bom to v3.27.3 (#7034)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 08:03:09 -08:00
renovate[bot] 14d714a311
fix(deps): update dependency io.grpc:grpc-bom to v1.70.0 (#7036)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-22 16:45:38 -06:00
renovate[bot] d704117f9d
fix(deps): update dependency org.owasp:dependency-check-gradle to v12.0.1 (#7035)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-22 16:45:12 -06:00
renovate[bot] 13e2b8c4df
fix(deps): update dependency io.grpc:grpc-bom to v1.69.1 (#7028)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 15:53:52 -08:00
renovate[bot] 2770fa1bb1
fix(deps): update dependency org.snakeyaml:snakeyaml-engine to v2.9 (#7022)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 11:20:59 -08:00
Trask Stalnaker 81d165d75c
Remove unnecessary workflow config (#7032) 2025-01-17 13:41:42 -06:00
jack-berg 31869a3fc6
Interpret timeout zero value as no limit (#7023) 2025-01-16 18:02:31 -06:00
renovate[bot] 4eeef33524
fix(deps): update spotless packages to v7.0.2 (#7018)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 15:25:50 -06:00
jack-berg a1c0d0bd64
Consistent application of exporter customizers when otel.{signal}.exporter=none (#7017) 2025-01-16 15:25:33 -06:00
Trask Stalnaker 97410cb24a
Add event name as an incubating feature (#7012)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2025-01-16 15:02:41 -06:00
Jonathan Halliday 2fb3ebad3d
Add AttributeKeyValue abstraction to common otlp exporters (#7026) 2025-01-16 14:28:05 -06:00
renovate[bot] c8da0201ab
fix(deps): update dependency io.netty:netty-bom to v4.1.117.final (#7016)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-14 12:16:32 -08:00
renovate[bot] bfd87cad4e
fix(deps): update dependency org.owasp:dependency-check-gradle to v12 (#7011)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-14 11:15:00 -08:00
Gregor Zeitlinger 4b3cedda0d
make extended tracer easier to use (#6943)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-01-14 11:14:47 -06:00
renovate[bot] d71db3a2f0
fix(deps): update dependency net.ltgt.gradle:gradle-nullaway-plugin to v2.2.0 (#7014)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 16:48:29 -06:00
jack-berg d56bdf5723
Remove -alpha artifacts from runtime classpath of stable components (#6944) 2025-01-13 16:01:14 -06:00
OpenTelemetry Bot 492b94f2b0
Post release for version 1.46.0 (#7015) 2025-01-13 14:55:23 -06:00
OpenTelemetry Bot d13fd38df1
Update version to 1.47.0 (#7009) 2025-01-10 11:47:27 -06:00
jack-berg 0920d11aec
Prepare 1.46.0 (#7007) 2025-01-10 10:41:51 -06:00
renovate[bot] 2e0b315ce6
fix(deps): update dependency com.google.protobuf:protobuf-bom to v4.29.3 (#7003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 09:47:05 -06:00
renovate[bot] d74e277ecb
fix(deps): update dependency com.squareup.okio:okio-bom to v3.10.2 (#7001)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 09:38:42 -06:00
renovate[bot] ccb6346e32
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.18.1 (#7005)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 09:38:29 -06:00
Jonathan Halliday 43b38e276c
Update profiling exporters for proto 1.5 (#6999) 2025-01-10 09:32:45 -06:00
renovate[bot] 330881a1d1
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.50.1 (#7000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 14:20:56 -06:00
renovate[bot] 6f8d4915b9
fix(deps): update spotless packages to v7.0.1 (#6998)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-07 13:33:05 -06:00
jack-berg 5f90b0352e
Fix span setStatus (#6990) 2025-01-07 13:04:44 -06:00
renovate[bot] d3e38077e7
fix(deps): update dependency com.squareup.okio:okio-bom to v3.10.1 (#6997)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-07 13:04:20 -06:00
renovate[bot] cf95056770
fix(deps): update dependency com.squareup.wire:wire-bom to v5.2.1 (#6996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-07 13:04:06 -06:00
renovate[bot] 1a84cbd00f
fix(deps): update spotless packages to v7 (major) (#6993)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2025-01-07 13:03:51 -06:00
renovate[bot] ccccd1b0a5
fix(deps): update dependency com.squareup.wire:wire-bom to v5.2.0 (#6988)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 13:30:39 -06:00
renovate[bot] e36e185c6a
fix(deps): update dependency com.uber.nullaway:nullaway to v0.12.3 (#6989)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 13:29:33 -06:00
jack-berg 2367ae5312
Add help wanted banner to readme (#6615) 2025-01-06 12:58:54 -06:00
jack-berg 8369d7f57e
Delete OTLP authenticator concept (#6984) 2025-01-06 11:29:26 -06:00
renovate[bot] aa5c74c9e0
fix(deps): update dependency org.assertj:assertj-bom to v3.27.2 (#6987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-04 14:03:17 -08:00
renovate[bot] ddc9c9162b
fix(deps): update dependency org.assertj:assertj-bom to v3.27.1 (#6985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-02 15:24:41 -08:00
jack-berg 986dbaa26e
Ensure Serializer runtime exceptions are rethrown as IOException (#6969) 2025-01-02 14:53:42 -06:00
renovate[bot] 98c3fc1b85
fix(deps): update dependency checkstyle to v10.21.1 (#6982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-28 19:19:41 -08:00
renovate[bot] fe810e73d3
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.18 (#6980)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-24 10:31:18 -08:00
Trask Stalnaker abdbf07dfd
Switch link checker to lychee (#6972) 2024-12-23 16:30:15 -08:00
renovate[bot] 717d8b0032
chore(deps): update dependency gradle to v8.12 (#6977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-21 11:51:53 -08:00
renovate[bot] ee05c5cb08
fix(deps): update dependency com.android.tools:desugar_jdk_libs to v2.1.4 (#6976)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-21 10:44:17 -08:00
renovate[bot] a3d807b70f
fix(deps): update dependency org.assertj:assertj-bom to v3.27.0 (#6974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 16:01:46 -06:00
jason plumb d294a42afb
Add getters/accessors for readable fields in ReadWriteLogRecord. (#6924) 2024-12-19 16:01:13 -06:00
renovate[bot] a084b3ae0a
chore(deps): update gradle/actions action to v4.2.2 (#6967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 15:58:42 -06:00
renovate[bot] b934a0a3d4
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.29.0-alpha (#6971)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 15:57:53 -06:00
jason plumb c1b9ec789c
Explicitly allow null into CompletableResultCode.failExceptionally() (#6963) 2024-12-19 15:57:17 -06:00
renovate[bot] 40b74b05e1
fix(deps): update dependency com.google.protobuf:protobuf-bom to v4.29.2 (#6968)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 15:56:53 -06:00
renovate[bot] 21529fa339
fix(deps): update prometheusserverversion to v1.3.5 (#6957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-12-19 15:56:38 -06:00
renovate[bot] 0e6af66d10
fix(deps): update dependency io.netty:netty-bom to v4.1.116.final (#6966)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 11:29:01 -08:00
renovate[bot] d95c4ea484
fix(deps): update dependency com.google.guava:guava-bom to v33.4.0-jre (#6965)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 08:43:11 -08:00
renovate[bot] a7a2c06145
fix(deps): update dependency com.google.guava:guava to v33.4.0-jre (#6964)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 07:42:00 -08:00
renovate[bot] e454311bd5
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.50.0 (#6949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 19:49:55 -08:00
renovate[bot] 77b1f64252
fix(deps): update dependency org.junit:junit-bom to v5.11.4 (#6961)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 07:40:30 -08:00
renovate[bot] c80845dfe4
fix(deps): update dependency com.uber.nullaway:nullaway to v0.12.2 (#6956)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-17 07:51:28 -08:00
renovate[bot] 1fcbed8d81
fix(deps): update dependency checkstyle to v10.21.0 (#6951)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-14 17:02:22 -08:00
renovate[bot] e80506a92f
chore(deps): update plugin com.gradle.develocity to v3.19 (#6947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-14 09:07:21 -08:00
Steve Rao 09b8db6563
Update VERSIONING.md (#6942)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-12-13 20:27:12 -08:00
jack-berg b32f64420c
Remove unused dependencies, cleanup code after stability (#6948) 2024-12-12 11:03:11 -06:00
renovate[bot] f68ba65d6b
fix(deps): update dependency com.linecorp.armeria:armeria-bom to v1.31.3 (#6941)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-11 17:15:54 -08:00
renovate[bot] 62f060ed9a
fix(deps): update dependency io.grpc:grpc-bom to v1.69.0 (#6938)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jason Plumb <jplumb@splunk.com>
2024-12-11 17:10:43 -08:00
jack-berg e3cfedee7d
Fix -alpha status of opentelemetry-api-incubator (#6945) 2024-12-11 15:12:06 -06:00
renovate[bot] efdacc1c18
fix(deps): update dependency io.zipkin.reporter2:zipkin-reporter-bom to v3.4.3 (#6934)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 07:42:47 -08:00
jack-berg aca4ee35cb
Declarative config: more qualified imports (#6930) 2024-12-06 20:12:04 -06:00
renovate[bot] 3928febd2d
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.17.5 (#6926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-12-06 17:55:35 -08:00
jack-berg 1f8ee517bf
Remove support for deprecated otel.experimental.resource.disabled.keys (#6931) 2024-12-06 17:22:12 -06:00
jack-berg e61e19ae23
Remove outdated TODOs (#6932) 2024-12-06 17:22:02 -06:00
jack-berg af1e1d57ee
Remove japicmp special case (#6933) 2024-12-06 17:21:52 -06:00
OpenTelemetry Bot 23780762b0
Post release for version 1.45.0 (#6929) 2024-12-06 15:01:55 -06:00
OpenTelemetry Bot bd8c008c3d
Update version to 1.46.0 (#6927) 2024-12-06 13:46:07 -06:00
jack-berg 541ef89e6a
Prepare for 1.45.0 release (#6923)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-12-06 13:03:13 -06:00
James Moessis b07dab31cd
Extends TextMapGetter with GetAll() method, implement usage in W3CBaggagePropagator (#6852)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-12-05 13:26:56 -06:00
renovate[bot] ee8d735de1
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.17.4 (#6912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-12-05 13:11:11 -06:00
renovate[bot] 236e119f66
fix(deps): update dependency org.owasp:dependency-check-gradle to v11.1.1 (#6921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 11:50:35 -06:00
Lauri Tulmin 3a5222f808
Fix missing unsafe available check (#6920) 2024-12-05 09:55:29 -06:00
renovate[bot] 6d62e8b742
fix(deps): update dependency com.google.protobuf:protobuf-bom to v4.29.1 (#6922)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-04 20:51:37 -08:00
renovate[bot] 59b49cf741
chore(deps): update plugin org.graalvm.buildtools.native to v0.10.4 (#6919)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-04 20:47:13 -08:00
renovate[bot] d2a0299587
fix(deps): update dependency com.linecorp.armeria:armeria-bom to v1.31.2 (#6918)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-03 16:59:01 -06:00
renovate[bot] 0ef86fae7d
fix(deps): update dependency io.prometheus:prometheus-metrics-exporter-httpserver to v1.3.4 (#6907)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-12-03 09:18:10 -06:00
renovate[bot] d61a5c3b37
fix(deps): update dependency com.google.protobuf:protobuf-bom to v4.29.0 (#6917)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-12-02 15:00:17 -06:00
Jonathan Halliday 3df2068d9f
Update opentelementry-proto to 1.4 (#6906) 2024-12-02 13:08:41 -06:00
renovate[bot] 9b2f6bace9
fix(deps): update dependency checkstyle to v10.20.2 (#6914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 07:42:06 -08:00
renovate[bot] bc482c996e
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.18.2 (#6910)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-29 14:00:01 -08:00
renovate[bot] e78de66e5f
fix(deps): update dependency io.grpc:grpc-bom to v1.68.2 (#6911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-28 21:15:39 -08:00
renovate[bot] 1cdb04d725
fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.1.0 (#6909)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-28 21:13:36 -08:00
Trask Stalnaker 7829f53c24
Update develocity configuration (#6903) 2024-11-25 10:34:18 -06:00
Josh Suereth 8a3329be4d
Fix repeated string serialization for JSON. (#6888)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-11-25 09:19:35 -06:00
Trask Stalnaker 6487ac2976
Remove outdated commented out code (#6904) 2024-11-24 10:14:59 -08:00
renovate[bot] c71bd9dfd5
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.20.4 (#6898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-22 10:14:09 -06:00
renovate[bot] d2e56b59c6
fix(deps): update dependency com.linecorp.armeria:armeria-bom to v1.31.1 (#6902)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-22 10:13:57 -06:00
renovate[bot] bab9fb9cdb
chore(deps): update dependency gradle to v8.11.1 (#6897)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-21 10:15:20 -06:00
jack-berg 7d74adafdc
Rename Marshaler#writeJsonToGenerator to allow jackson runtimeOnly dependency (#6896) 2024-11-20 10:59:08 -06:00
renovate[bot] 8d6578fbe8
fix(deps): update errorproneversion to v2.36.0 (#6894)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-19 14:59:52 -06:00
Eugene Ma e0a6e64fc7
lazily initialize ReservoirCells (#6851)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2024-11-18 15:56:03 -06:00
jack-berg cde3d45f04
Don't require empty objects when referencing custom components (#6891) 2024-11-18 15:55:00 -06:00
Saurabh Lodha 2a97eaedc5
Add synchronization to SimpleLogRecordProcessor and SimpleSpanProcessor to ensure thread-safe export of logs and spans respectively (#6885) 2024-11-18 15:54:40 -06:00
renovate[bot] ec3c55ffeb
chore(deps): update gradle/actions action to v4.2.1 (#6890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 15:53:37 -06:00
Ravishankar Nagendran 26f359b3e9
Add javadoc boilerplate internal comment v2 for experimental classes (#6886)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-11-18 14:59:28 -06:00
Xin 4c30ec48d3
Add convenience method `setAttribute(Attribute<Long>, int)` to SpanBuilder (matching the existing convenience method in Span) (#6884)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-11-18 14:41:17 -06:00
renovate[bot] 46b2fcda7d
chore(deps): update dependency gradle to v8.11 (#6871)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-11-18 10:33:09 -06:00
renovate[bot] dbda01ec07
fix(deps): update dependency ru.vyarus:gradle-animalsniffer-plugin to v1.7.2 (#6889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 10:05:00 -06:00
renovate[bot] 9084a59127
fix(deps): update dependency com.linecorp.armeria:armeria-bom to v1.31.0 (#6877)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-11-18 09:57:22 -06:00
renovate[bot] b482e76711
fix(deps): update dependency io.netty:netty-bom to v4.1.115.final (#6872)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 09:49:54 -06:00
renovate[bot] fb2a47cf76
chore(deps): update codecov/codecov-action action to v5 (#6878)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 09:33:04 -06:00
renovate[bot] acde5b62f8
chore(deps): update gradle/actions action to v4.2.0 (#6873)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 09:27:32 -06:00
renovate[bot] 78565d813b
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.49.0 (#6879)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 09:22:20 -06:00
jack-berg bd31b457f0
Refactor README.md (#6881) 2024-11-18 09:08:20 -06:00
renovate[bot] 9a0bfb2311
chore(deps): update plugin com.gradle.develocity to v3.18.2 (#6874)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-17 16:25:45 -08:00
jack-berg ca98fc53be
Post release v1.44.1 (#6883) 2024-11-15 16:27:01 -06:00
OpenTelemetry Bot 1566984262
Merge change log updates from release/v1.44.x (#6869) 2024-11-10 17:45:34 -08:00
Trask Stalnaker 6c0d140dff
Fix regression in event attributes (#6865) 2024-11-09 08:04:04 -08:00
OpenTelemetry Bot e62d7c69cb
Post release for version 1.44.0 (#6864) 2024-11-09 09:29:43 -06:00
OpenTelemetry Bot 597eb09de4
Update version to 1.45.0 (#6862) 2024-11-08 12:30:04 -06:00
jack-berg e38ebf5dc3
Prepare 1.44.0 (#6861) 2024-11-08 11:42:51 -06:00
renovate[bot] b5fab78314
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.17.3 (#6854)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-08 09:18:04 -06:00
renovate[bot] 7dcf73f2d8
fix(deps): update dependency com.android.tools:desugar_jdk_libs to v2.1.3 (#6853)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-08 09:17:44 -06:00
renovate[bot] 0a4aa3cbd2
fix(deps): update dependency me.champeau.gradle:japicmp-gradle-plugin to v0.4.5 (#6859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-08 09:16:14 -06:00
Gregor Zeitlinger 2a1c2749ff
update prom client (#6857) 2024-11-08 09:15:58 -06:00
renovate[bot] 6c3725d916
fix(deps): update dependency checkstyle to v10.20.1 (#6856)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-07 09:10:45 -08:00
renovate[bot] bc2487f274
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.17.2 (#6849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-06 18:40:08 -08:00
Gregor Zeitlinger a6b33029be
bugfix: add newline in stdout exporter (#6848) 2024-11-05 12:37:40 -06:00
Jonathan Halliday 98fa296098
Add ByteBuffer field type marshaling support to exporter. (#6686) 2024-11-05 12:36:52 -06:00
jack-berg 7e4da160ba
Refactor metrics to remove MeterSharedState (#6845) 2024-11-05 09:00:54 -06:00
renovate[bot] fd58d10628
chore(deps): update plugin com.gradleup.shadow to v8.3.5 (#6847)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 20:15:18 -08:00
renovate[bot] ef032394dc
fix(deps): update dependency checkstyle to v10.20.0 (#6843)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-02 12:55:51 -07:00
jack-berg e4f39789bd
Add error prone checks for internal javadoc and private constructors (#6844) 2024-11-01 15:55:14 -05:00
jack-berg d9fce84689
Fix ConfigUtil#getString ConcurrentModificationException (#6841)
Co-authored-by: neugartf <fabianneugart@gmail.com>
Co-authored-by: Fabian Neugart <neugartf@users.noreply.github.com>
2024-11-01 14:29:48 -05:00
Trask Stalnaker ff4fe978e5
Test Windows in CI (#6824) 2024-11-01 09:01:14 -05:00
renovate[bot] 2e8bf7f9a1
fix(deps): update dependency org.owasp:dependency-check-gradle to v11.1.0 (#6839)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-30 13:25:36 -05:00
renovate[bot] 2de12fee5a
fix(deps): update dependency io.prometheus:prometheus-metrics-exporter-httpserver to v1.3.2 (#6805)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-10-29 10:01:35 -05:00
renovate[bot] 1e3cf0b7e3
fix(deps): update dependency me.champeau.gradle:japicmp-gradle-plugin to v0.4.4 (#6769)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-10-29 10:01:16 -05:00
Teja fcae15e927
Stabilize ExceptionEventData (#6795)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-10-29 09:53:38 -05:00
renovate[bot] 3f05bf6ae2
fix(deps): update dependency io.grpc:grpc-bom to v1.68.1 (#6835)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:53:00 -05:00
renovate[bot] 73894cfe96
chore(deps): update plugin com.gradleup.shadow to v8.3.4 (#6834)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:52:47 -05:00
renovate[bot] e65edd942b
fix(deps): update dependency net.ltgt.gradle:gradle-errorprone-plugin to v4.1.0 (#6806)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:52:05 -05:00
renovate[bot] c7e797c5b4
fix(deps): update errorproneversion to v2.35.1 (#6820)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:12:49 -05:00
renovate[bot] c8967098c7
fix(deps): update dependency org.owasp:dependency-check-gradle to v11 (#6817)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:12:20 -05:00
renovate[bot] fc86a76c87
fix(deps): update dependency net.ltgt.gradle:gradle-nullaway-plugin to v2.1.0 (#6807)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:11:56 -05:00
renovate[bot] 2b0df092dc
fix(deps): update dependency checkstyle to v10.19.0 (#6822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:11:31 -05:00
renovate[bot] e6e2f3c36a
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.18.1 (#6831)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:11:10 -05:00
renovate[bot] 8af18033cf
fix(deps): update dependency com.uber.nullaway:nullaway to v0.12.1 (#6830)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 09:10:52 -05:00
Trask Stalnaker ee21d4dcf3
Run tests on Java 23 (#6825) 2024-10-29 08:52:06 -05:00
Jiwon 740dd14f52
Fix gRPC Retry Mechanism for Unsuccessful HTTP Responses (#6829) 2024-10-28 19:40:00 -05:00
renovate[bot] 74579aa2a1
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.48.0 (#6821)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-25 16:31:37 -07:00
renovate[bot] fd4e5fe569
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.20.3 (#6816)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-24 16:56:47 -07:00
renovate[bot] 192f7fa4fe
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.47.0 (#6818)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-23 18:28:58 -07:00
Teja bc4bacf5ee
Stabilizing `otel.experimental.resource.disabled.keys` (#6809)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2024-10-23 14:29:42 -05:00
jack-berg 10bca8b2b2
Enable reusuable_data memory mode by default (#6799) 2024-10-23 14:28:41 -05:00
renovate[bot] 5ec1e8688e
fix(deps): update dependency org.junit:junit-bom to v5.11.3 (#6810)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-22 13:09:18 -07:00
jack-berg 45b8c13b12
Log a warning if OTLP endpoint port is likely incorrect given the protocol (#6813) 2024-10-22 09:30:08 -05:00
jack-berg f52554bc52
Rebrand file configuration to declarative configuration in documentation (#6812) 2024-10-22 09:12:07 -05:00
jack-berg 8793935d8f
Add note about updating autoconfigure docs when releasing (#6811) 2024-10-22 09:11:41 -05:00
renovate[bot] 628db61339
fix(deps): update dependency com.google.errorprone:error_prone_annotations to v2.34.0 (#6804)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-19 11:40:36 -07:00
renovate[bot] 680c9406fd
fix(deps): update dependency com.uber.nullaway:nullaway to v0.12.0 (#6803)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-18 16:34:53 -07:00
jack-berg 62df132007
Set declarative config default OTLP protocol to http/protobuf (#6800) 2024-10-17 12:42:37 -05:00
Gregor Zeitlinger 1ac476b3b7
add stdout memory mode (#6774) 2024-10-17 10:49:01 -05:00
jack-berg 07b6903b85
Stabilize metric cardinality limits APIs (#6794) 2024-10-17 09:32:25 -05:00
jack-berg 537f5c4e79
Fix declarative config env substitution by disallowing '}' in default value (#6793) 2024-10-16 08:39:12 -05:00
Hervé Boutemy 8194c10b78
add Reproducible Builds badge (#6788) 2024-10-15 17:14:45 -07:00
Trask Stalnaker 83b30b5d0e
Bump config file format version (#6786) 2024-10-15 13:13:51 -05:00
renovate[bot] 3e650f00a1
fix(deps): update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.28.0-alpha (#6792)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-15 10:15:15 -05:00
OpenTelemetry Bot e4d5109c49
Post release for version 1.43.0 (#6785) 2024-10-11 17:01:39 -05:00
OpenTelemetry Bot 1554ccbf18
Update version to 1.44.0 (#6784) 2024-10-11 11:54:50 -05:00
jack-berg b1cd30ef7f
Prepare changelog for 1.43.0 release (#6782) 2024-10-11 11:01:55 -05:00
jason plumb b6badb2ca3
Adds Baggage.getEntry(String key) (#6765)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-10-11 09:33:11 -05:00
renovate[bot] e6eceb5115
fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.0.21 (#6778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-10 18:13:41 -07:00
Gregor Zeitlinger b927d9daf4
Stdout exporter for span and metrics (#6750) 2024-10-09 13:17:14 -05:00
Adriano Machado eb53fe3a61
Add helper class to capture context using ScheduledExecutorService (#6712)
Signed-off-by: Adriano Machado <60320+ammachado@users.noreply.github.com>
2024-10-07 10:08:21 -05:00
renovate[bot] 0f859b4385
chore(deps): update plugin com.gradleup.shadow to v8.3.3 (#6758)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-06 14:04:26 -07:00
renovate[bot] a7f950d7fd
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.46.0 (#6766)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-06 12:22:53 -07:00
renovate[bot] 65af6511e5
fix(deps): update dependency com.toasttab.android:gummy-bears-api-21 to v0.10.0 (#6762)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-05 19:51:14 -07:00
renovate[bot] 503cc533f2
fix(deps): update dependency org.junit:junit-bom to v5.11.2 (#6764)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-05 13:25:03 -07:00
renovate[bot] 814e06401d
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.17.1 (#6760)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-04 18:48:07 -07:00
jack-berg a6a9acb1dd
Add getStructured default method, add empty StructuredConfigProperties (#6759) 2024-10-02 15:16:21 -05:00
renovate[bot] 361f035efe
chore(deps): update dependency ubuntu to v24 (#6751)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 15:48:54 -05:00
renovate[bot] 4aa7f57842
fix(deps): update dependency com.google.api.grpc:proto-google-common-protos to v2.45.1 (#6739)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 15:20:49 -05:00
renovate[bot] 6c7efe280b
fix(deps): update errorproneversion to v2.33.0 (#6754)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 15:20:19 -05:00
renovate[bot] 0260d82716
fix(deps): update dependency org.testcontainers:testcontainers-bom to v1.20.2 (#6755)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 15:20:00 -05:00
renovate[bot] 27f9868117
fix(deps): update dependency io.netty:netty-bom to v4.1.114.final (#6757)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 15:19:48 -05:00
renovate[bot] 7f8fbc9bbd
fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.18.0 (#6752)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-09-30 14:53:51 -05:00
renovate[bot] 184685536e
fix(deps): update dependency com.google.guava:guava-bom to v33.3.1-jre (#6744)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 14:15:24 -05:00
renovate[bot] de6efccb99
fix(deps): update dependency nl.jqno.equalsverifier:equalsverifier to v3.17 (#6745)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 14:15:04 -05:00
renovate[bot] fa7db47889
fix(deps): update dependency checkstyle to v10.18.2 (#6753)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 14:14:37 -05:00
renovate[bot] d904b133e4
fix(deps): update dependency com.google.guava:guava to v33.3.1-jre (#6743)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 14:14:19 -05:00
renovate[bot] 94b7d25905
chore(deps): update dependency gradle to v8.10.2 (#6742)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 14:14:02 -05:00
viveksing 46b28eb45e
Fix ottracepropagation for short span ids (#6734) 2024-09-30 14:13:09 -05:00
jack-berg 2dbb8de349
Update to opentelemetry-configuration v0.3.0 (#6733) 2024-09-30 14:12:25 -05:00
renovate[bot] 697b4e0c70
fix(deps): update dependency org.junit:junit-bom to v5.11.1 (#6748)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-25 18:35:32 -07:00
renovate[bot] fa826fdef0
fix(deps): update dependency com.google.protobuf:protobuf-bom to v3.25.5 (#6730)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 11:07:08 -05:00
renovate[bot] a5de6d5cbb
chore(deps): update plugin org.jsonschema2pojo to v1.2.2 (#6736)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 11:06:51 -05:00
renovate[bot] c5f6218ded
fix(deps): update dependency com.uber.nullaway:nullaway to v0.11.3 (#6727)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 11:06:27 -05:00
jack-berg 325822ce85
Use autoconfigured ClassLoader to load declarative config (#6725) 2024-09-20 14:00:04 -05:00
renovate[bot] 39b24118a1
fix(deps): update dependency io.grpc:grpc-bom to v1.68.0 (#6735)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-20 12:05:58 -05:00
Jonathan Halliday af59cc4a0b
Add Marshalers for profiling signal type (#6680) 2024-09-20 11:52:06 -05:00
Alex Boten 799039247b
tests: update references to logging exporter (#6692)
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-09-20 11:49:44 -05:00
renovate[bot] de13ff183a
Update dependency io.zipkin.reporter2:zipkin-reporter-bom to v3.4.2 (#6704)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 18:10:20 -07:00
renovate[bot] 485c123a42
Update plugin com.gradle.develocity to v3.18.1 (#6708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 16:17:07 -07:00
renovate[bot] 9c466f4a13
Update dependency org.snakeyaml:snakeyaml-engine to v2.8 (#6728)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 16:37:21 -05:00
renovate[bot] bd88acae57
Update dependency com.squareup.wire:wire-bom to v5.1.0 (#6710)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 16:37:01 -05:00
renovate[bot] 31e562f9a5
Update dependency com.squareup.okio:okio-bom to v3.9.1 (#6720)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 16:36:45 -05:00
Gregor Zeitlinger c9c857c908
add context info about wrong span or trace (#6703) 2024-09-18 16:36:30 -05:00
renovate[bot] d773f3bfe2
Update gradle/actions action to v4.1.0 (#6722)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 16:24:04 -05:00
renovate[bot] a63f9195a1
Update errorProneVersion to v2.32.0 (#6713)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 16:23:51 -05:00
renovate[bot] 5b421b6d57
Update plugin com.gradleup.shadow to v8.3.2 (#6705)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 16:23:13 -05:00
Teja 9249653f69
Adding model as suffix to generated classes. (#6721) 2024-09-18 16:02:06 -05:00
Gregor Zeitlinger d899702eab
add stdout log record exporter (#6675)
Co-authored-by: Jack Berg <jberg@newrelic.com>
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2024-09-18 16:00:44 -05:00
jack-berg 82b9e9b64d
Optimize advice with FilteredAttributes (#6633) 2024-09-18 15:07:31 -05:00
renovate[bot] 0132d5d98b
Update dependency com.linecorp.armeria:armeria-bom to v1.30.1 (#6701)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-17 18:22:23 -07:00
renovate[bot] 983800cc56
Update plugin org.graalvm.buildtools.native to v0.10.3 (#6702)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 20:43:42 -07:00
renovate[bot] 18d192d1fa
Update dependency com.google.api.grpc:proto-google-common-protos to v2.44.0 (#6697)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-12 18:16:33 -07:00
renovate[bot] 57f94cf92a
Update dependency gradle to v8.10.1 (#6694)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 20:34:15 -07:00
jack-berg 8fb169e934
Codify stance against using java-test-fixtures plugin (#6696) 2024-09-11 09:16:58 -05:00
OpenTelemetry Bot 0feca55ee2
Post release for version 1.42.0 (#6711) 2024-09-11 09:16:39 -05:00
OpenTelemetry Bot a55e9b6440
Merge change log updates from release/v1.42.x (#6707) 2024-09-10 10:25:06 -05:00
jack-berg 9ddccada89
Stop publishing test fixtures with opentelemetry-api (#6695) 2024-09-09 21:02:28 -05:00
OpenTelemetry Bot b0643fef38
Post release for version 1.42.0 (#6691) 2024-09-06 11:57:22 -05:00
OpenTelemetry Bot 0a47581b2e
Update version to 1.43.0 (#6689) 2024-09-06 10:40:39 -05:00
jack-berg fbdb90621b
Prepare 1.42.0 (#6688) 2024-09-06 10:04:55 -05:00
Gregor Zeitlinger f85a57b5b6
don't throw class cast exception when we have a noop tracer, meter, logger (#6617)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-09-05 16:02:27 -05:00
jack-berg 1f6de3590d
Align GrpcSender contract with HttpSender (#6658) 2024-09-05 15:22:56 -05:00
jack-berg 00b0e9f87c
Declarative configuration missing pieces (#6677) 2024-09-05 15:08:18 -05:00
jackshirazi 61a4b46676
make SdkTracer.tracerEnabled mutable (#6687)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2024-09-05 15:07:33 -05:00
renovate[bot] aef4ca5b1e
Update dependency io.netty:netty-bom to v4.1.113.Final (#6685)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-05 13:50:06 -05:00
jason plumb e063b34a2a
Add asserts for event body fields (#6509) 2024-09-05 11:55:02 -05:00
renovate[bot] 5ca6177fcf
Update dependency org.owasp:dependency-check-gradle to v10.0.4 (#6679)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-04 14:29:36 -05:00
Drew Hammond 43be1e7f9d
change polling interval property name to match spec (#6672)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-09-04 14:03:19 -05:00
Jonas Kunz 09de4bd105
Added SpanProcessor OnEnding callback (#6367)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2024-09-04 13:52:09 -05:00
renovate[bot] bc2fad4cf3
Update dependency com.android.tools:desugar_jdk_libs to v2.1.2 (#6684)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-04 09:43:03 -07:00
renovate[bot] ee7fd27449
Update dependency com.android.tools:desugar_jdk_libs to v2.1.1 (#6671)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-01 10:07:15 -07:00
renovate[bot] 37e35b239b
Update errorProneVersion to v2.31.0 (#6642)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-08-30 14:53:57 -05:00
renovate[bot] 365fe8a443
Update dependency checkstyle to v10.18.1 (#6678)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-30 10:55:33 -05:00
jack-berg 649f963a1a
Stabilize log any value (#6591) 2024-08-30 10:22:38 -05:00
jack-berg d37c1c74e7
Add file configuration ComponentProvider support for propagators (#6624) 2024-08-28 15:18:19 -05:00
jack-berg 938b03dff6
Add file configuration ComponentProvider support for samplers (#6494) 2024-08-28 15:09:36 -05:00
jack-berg 8495996d54
Processor component provider (#6623) 2024-08-28 14:59:04 -05:00
jack-berg 05fe136cb3
Add file configuration ComponentProvider support for resources (#6625) 2024-08-28 14:42:37 -05:00
renovate[bot] 902c46e2a7
Update gradle/actions action to v4.0.1 (#6673)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-27 20:25:20 -07:00
Jarrod Robins 71124d2c5b
Return status code exceptions via CompletableResultCode in GrpcExporter and HttpExporter (#6645) 2024-08-27 14:49:11 -05:00
renovate[bot] 7522bfe141
Update dependency checkstyle to v10.18.0 (#6670)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
2024-08-25 12:57:30 -07:00
renovate[bot] c90175f1ae
Update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.0.20 (#6663)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 18:44:24 -07:00
renovate[bot] 97185c6fa0
Update dependency nl.jqno.equalsverifier:equalsverifier to v3.16.2 (#6667)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 18:39:22 -07:00
jack-berg 97b3fa42f1
Remove outdated ExtendedSpanBuilder javadoc example (#6659) 2024-08-20 20:05:51 -07:00
renovate[bot] dc4cc27009
Update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.27.0-alpha (#6660)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-20 16:16:11 -05:00
SylvainJuge d4b10a89a0
add ns and us for config duration units (#6654)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-08-20 12:30:20 -05:00
renovate[bot] 3e8092d086
Update plugin com.gradle.develocity to v3.18 (#6656)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 15:59:42 -05:00
renovate[bot] d7626e32d4
Update dependency com.uber.nullaway:nullaway to v0.11.2 (#6657)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 15:59:23 -05:00
renovate[bot] df7bda64e6
Update dependency com.google.guava:guava to v33.3.0-jre (#6652)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 14:33:25 -05:00
renovate[bot] e94c0d133b
Update dependency com.google.api.grpc:proto-google-common-protos to v2.43.0 (#6651)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 14:33:13 -05:00
renovate[bot] 4751c07a19
Update dependency com.google.guava:guava-bom to v33.3.0-jre (#6653)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 14:32:48 -05:00
SylvainJuge 023c8cc291
Fix broken markdown links (#6655) 2024-08-19 13:58:23 -05:00
Chung Nguyen 581690ecac
supress zipkin exporters instrumentations (#6552) 2024-08-19 13:57:08 -05:00
renovate[bot] 32c8d66580
Update dependency gradle to v8.10 (#6647)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 13:55:08 -05:00
renovate[bot] ad120a5bff
Update dependency org.junit:junit-bom to v5.11.0 (#6646)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-14 19:06:49 -07:00
renovate[bot] dcdc6727f7
Update dependency com.linecorp.armeria:armeria-bom to v1.30.0 (#6643)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-12 19:22:08 -07:00
renovate[bot] 5af07a6b9d
Update slf4j monorepo to v2.0.16 (#6641)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-10 12:12:07 -07:00
jack-berg 94238acd71
New gradle shadow plugin location (#6637) 2024-08-09 17:25:33 -05:00
OpenTelemetry Bot 354e957b3e
Post release for version 1.41.0 (#6640) 2024-08-09 12:12:07 -05:00
OpenTelemetry Bot 5ec05db03b
Update version to 1.42.0 (#6639) 2024-08-09 10:50:51 -05:00
jack-berg f161a1e039
Prepare 1.41.0 (#6635) 2024-08-09 09:55:32 -05:00
jack-berg 910c7cc218
Retry ConnectException, add retry logging (#6614) 2024-08-09 09:39:37 -05:00
Abhishek Kumar e2936d4609
Add config to enable Default Exponential Histogram for Prometheus Exporter (#6541)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-08-08 16:31:16 -05:00
jack-berg fc283ba763
Completable result code throwable (#6348) 2024-08-08 16:11:47 -05:00
jack-berg d16ba00e15
Avoid allocations when advice doesn't remove any attributes (#6629) 2024-08-08 15:34:16 -05:00
renovate[bot] b53c48a769
Update slf4j monorepo to v2.0.15 (#6622)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-08 15:30:31 -05:00
renovate[bot] e8b50c6887
Update gradle/actions action to v4 (#6618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jason Plumb <jplumb@splunk.com>
2024-08-08 15:22:45 -05:00
renovate[bot] 4f9d1c9fc6
Update dependency io.grpc:grpc-bom to v1.66.0 (#6631)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-08 15:09:14 -05:00
jack-berg 56e7ebe669
Remove nullable from file config Factory contract (#6612) 2024-08-08 15:08:57 -05:00
renovate[bot] 04a2b0a841
Update dependency org.awaitility:awaitility to v4.2.2 (#6627)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-07 20:06:37 -07:00
renovate[bot] 5be177df55
Update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.0.10 (#6621)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-06 19:55:22 -07:00
renovate[bot] 477658a6ec
Update dependency org.testcontainers:testcontainers-bom to v1.20.1 (#6611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-06 18:55:02 -07:00
jack-berg 0ffe15cf83
Fix broken link to community contributing guide (#6616) 2024-08-05 21:34:42 -05:00
jack-berg ea6e3ddb7e
Add file configuration ComponentProvider support for exporters (#6493) 2024-08-05 11:06:27 -05:00
renovate[bot] 6fc1d216ca
Update dependency com.linecorp.armeria:armeria-bom to v1.29.4 (#6606)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-30 19:37:41 -07:00
renovate[bot] 3a597446b3
Update dependency com.google.protobuf:protobuf-bom to v3.25.4 (#6602)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-30 09:36:45 -05:00
renovate[bot] ea14b9282b
Update dependency com.google.api.grpc:proto-google-common-protos to v2.42.0 (#6605)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-30 09:35:14 -05:00
renovate[bot] 1b5ce82b0a
Update dependency com.uber.nullaway:nullaway to v0.11.1 (#6608)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-30 09:34:54 -05:00
renovate[bot] c43835970c
Update dependency com.toasttab.android:gummy-bears-api-21 to v0.9.0 (#6600)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-28 18:11:24 -07:00
renovate[bot] be91b6fac1
Update plugin com.gradle.develocity to v3.17.6 (#6597)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-27 17:24:31 -07:00
Jonathan Halliday 26b3d41d72
Add Marshalers for profiling signal type (#6565) 2024-07-23 09:28:12 -05:00
Abhijeet V 468b528956
Use generateCertificates() of CertificateFactory to process certificates (#6579)
Signed-off-by: Abhijeet V <31417623+abvaidya@users.noreply.github.com>
Co-authored-by: ET <evantorrie@users.noreply.github.com>
2024-07-22 14:11:19 -05:00
renovate[bot] 685a3784d6
Update errorProneVersion to v2.29.2 (#6593)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-20 15:53:43 -07:00
renovate[bot] 35d1d383f5
Update dependency io.netty:netty-bom to v4.1.112.Final (#6595)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-19 19:14:28 -07:00
jack-berg 8fd45a771c
Enable retry by default for OTLP exporters (#6588) 2024-07-19 14:27:57 -05:00
jack-berg fa215ff242
Update stability status of opentelemetry-exporter-sender-jdk in readme (#6592) 2024-07-19 13:56:32 -05:00
renovate[bot] 0b513ad227
Update errorProneVersion to v2.29.1 (#6586)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-17 18:29:01 -07:00
SylvainJuge 8f3460ae43
suppress instrumentation: move to api + generic context key (#6546) 2024-07-17 14:38:32 -05:00
renovate[bot] 958b59be4d
Update dependency com.squareup.wire:wire-bom to v5 (#6580)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-07-17 14:38:02 -05:00
renovate[bot] 034c0c2ded
Update dependency org.owasp:dependency-check-gradle to v10.0.3 (#6585)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-17 14:26:47 -05:00
renovate[bot] 6dd000be25
Update dependency org.testcontainers:testcontainers-bom to v1.20.0 (#6590)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-17 14:26:13 -05:00
renovate[bot] dc1ec9cbed
Update gradle/actions action to v3.5.0 (#6582)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-16 19:13:49 -07:00
renovate[bot] 3fa57f9280
Update dependency io.grpc:grpc-bom to v1.65.1 (#6573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-12 21:35:32 -07:00
renovate[bot] 82ad786856
Update dependency gradle to v8.9 (#6570)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-12 20:19:47 -07:00
John Watson fbb5ebb01e
PR 6524 with amendments (#6569)
Co-authored-by: junwense <970597653@qq.com>
Co-authored-by: SeanJ <44492651+junwense@users.noreply.github.com>
2024-07-12 20:09:03 -07:00
Tyler Benson 20bcd7546b
Add links from experimental methods to the helper functions that allow access to them. (#6529)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-07-11 17:03:17 -05:00
renovate[bot] 38aeffff14
Update dependency com.linecorp.armeria:armeria-bom to v1.29.2 (#6567)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-10 20:37:35 -07:00
shalk(xiao kun) 3aeb410ecc
rename open-telemetry-docs to opentelemetry-java-examples (#6564) 2024-07-09 18:14:08 -07:00
renovate[bot] 8ad5cacc16
Update dependency com.google.api.grpc:proto-google-common-protos to v2.41.0 (#6538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-09 18:06:39 -07:00
renovate[bot] 0bc74744cb
Update dependency org.assertj:assertj-bom to v3.26.3 (#6566)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-09 13:04:07 -07:00
renovate[bot] 09c7c4a992
Update dependency com.fasterxml.jackson:jackson-bom to v2.17.2 (#6557)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 15:52:31 -07:00
renovate[bot] 13a11fb801
Update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.26.0-alpha (#6563)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 15:14:12 -07:00
HS.Zhang f1fc3cd17c
Update the Composing builds section in contributing.md (#6560)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-07-08 15:12:37 -07:00
renovate[bot] 7b85775807
Update dependency org.owasp:dependency-check-gradle to v10 (#6547)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 16:55:02 -05:00
Jonathan Halliday 6b1092a89f
Add exporter data model impl for profiling signal type. (#6498) 2024-07-08 16:45:26 -05:00
renovate[bot] 5ebb37ac6f
Update dependency org.codehaus.mojo:animal-sniffer-annotations to v1.24 (#6553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 16:23:12 -05:00
OpenTelemetry Bot 50d307c46e
Post release for version 1.40.0 (#6562) 2024-07-08 16:19:20 -05:00
John Watson 99c5b94004
Ignore the japicmp diff check for bot PRs (#6559) 2024-07-08 08:45:35 -07:00
OpenTelemetry Bot d7e7542c76
Update version to 1.41.0 (#6555)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-07-05 17:19:49 -05:00
jack-berg c48fe94271
Prepare changelog for 1.40.0 release (#6554) 2024-07-05 12:07:00 -05:00
jack-berg 1f7d6a507e
Add APIs to determine if tracer, logger, instruments are enabled (#6502) 2024-07-03 15:34:18 -05:00
jack-berg 9fd6bcae9e
Fix build after recent collector release (#6548) 2024-07-02 15:25:23 -07:00
renovate[bot] b56af03b99
Update dependency io.opentelemetry.proto:opentelemetry-proto to v1.3.1-alpha (#6442)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-07-01 15:45:39 -05:00
renovate[bot] 22aaae8d44
Update dependency org.skyscreamer:jsonassert to v1.5.3 (#6535)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-29 15:43:36 -07:00
renovate[bot] c1ff34c2be
Update dependency net.ltgt.gradle:gradle-errorprone-plugin to v4.0.1 (#6533)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 12:44:33 -07:00
renovate[bot] ed46fa36d0
Update dependency com.linecorp.armeria:armeria-bom to v1.29.1 (#6543)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 09:21:03 -07:00
renovate[bot] 021e7fe470
Update dependency io.grpc:grpc-bom to v1.65.0 (#6544)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 09:18:23 -07:00
renovate[bot] 4086210ba9
Update dependency org.junit:junit-bom to v5.10.3 (#6542)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-27 10:49:08 -07:00
Sebastian Alfers fe8a7f4bab
Fix typo in java doc for setRetryPolicy (#6503)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-06-26 13:49:18 -07:00
jack-berg 9bfb81b66b
Fix CollectorIntegrationTest (#6537) 2024-06-26 12:13:46 -05:00
Trask Stalnaker 0aacc55d1e
Narrow ExtendedSpanBuilder return types for chaining (#6514) 2024-06-24 15:07:42 -05:00
Jay DeLuca a09eff6100
Reference configuration documentation on opentelemetry.io (#6491)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2024-06-24 13:44:24 -05:00
ICTylor cbac202044
Update README.md JDK Sender link to point to JDK sender instead of OkHttp one (#6532) 2024-06-21 08:57:56 -07:00
renovate[bot] 12eb62659d
Update gradle/actions action to v3.4.2 (#6527)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-18 20:52:04 -07:00
renovate[bot] b748a1dbaf
Update docker/build-push-action action to v6 (#6525)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-18 19:31:34 -07:00
Helen 0750660f6f
Fix #6499 Update dependency me.champeau.gradle:japicmp-gradle-plugin to v0.4.3 (#6522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-15 10:49:21 -07:00
renovate[bot] 0bc911dc0a
Update gradle/actions action to v3.4.1 (#6523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-15 10:48:13 -07:00
renovate[bot] cff8b81fd6
Update plugin com.gradle.develocity to v3.17.5 (#6519)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-15 10:47:39 -07:00
renovate[bot] a686280aaf
Update dependency com.linecorp.armeria:armeria-bom to v1.29.0 (#6516)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-12 09:02:42 -07:00
renovate[bot] 4680146024
Update dependency io.netty:netty-bom to v4.1.111.Final (#6515)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-11 10:29:56 -07:00
Shelby Huang 7ee367a57f
Fix the JMH task execution failure. (#6495) 2024-06-10 11:34:37 -07:00
OpenTelemetry Bot 5ad5b067f0
Post release for version 1.39.0 (#6512) 2024-06-09 20:04:13 -07:00
OpenTelemetry Bot be25f4ef0c
Update version to 1.40.0 (#6507) 2024-06-07 07:05:33 -05:00
jack-berg edbb475957
Prepare 1.39.0 (#6506)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-06-07 06:40:17 -05:00
jack-berg 934da846f0
Fix incubator docs (#6505) 2024-06-06 16:10:50 -05:00
jack-berg d0b463dd6f
Refactor ExtendedTracer, ExtendedSpanBuilder to reflect incubating API conventions (#6497) 2024-06-06 09:42:01 -05:00
renovate[bot] 73646871e3
Update dependency net.ltgt.gradle:gradle-errorprone-plugin to v4 (#6501)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 10:37:25 -07:00
renovate[bot] 5a843989e2
Update dependency org.jctools:jctools-core to v4.0.5 (#6500)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 10:35:39 -07:00
renovate[bot] a68349e290
Update errorProneVersion to v2.28.0 (#6489)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 10:31:05 -07:00
renovate[bot] e15eedc1ed
Update dependency com.google.api.grpc:proto-google-common-protos to v2.40.0 (#6490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 10:26:28 -07:00
renovate[bot] 88be482c8e
Update dependency gradle to v8.8 (#6488)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 10:08:49 -07:00
renovate[bot] 915cb4d0a1
Update dependency com.uber.nullaway:nullaway to v0.11.0 (#6487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 10:07:53 -07:00
renovate[bot] 80c8d35614
Update autoValueVersion to v1.11.0 (#6485)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 09:59:29 -07:00
renovate[bot] aee034ae08
Update dependency com.google.auto.value:auto-value-annotations to v1.11.0 (#6486)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 09:57:47 -07:00
renovate[bot] a7a26f9a17
Update dependency com.google.guava:guava to v33.2.1-jre (#6483)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 09:55:21 -07:00
renovate[bot] 6d077c9344
Update dependency com.google.guava:guava-bom to v33.2.1-jre (#6484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 09:54:59 -07:00
Lauri Tulmin 56c1879079
Use unsafe to speed up string marshaling (#6433) 2024-06-03 17:14:20 -05:00
jack-berg d9cef81e29
Define dedicated file configuration SPI ComponentProvider (#6457) 2024-06-03 12:49:41 -05:00
Jonathan Halliday 809457d2b0
Add exporter data classes for experimental profiling signal type. (#6374) 2024-06-03 10:02:43 -05:00
renovate[bot] 788347e262
Update dependency org.jctools:jctools-core to v4.0.4 (#6481)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-30 11:24:03 -07:00
jack-berg f57906131e
Make OTLP exporter memory mode API public (#6469) 2024-05-30 09:02:54 -05:00
Fabian Stäber 7da7037717
Make /metrics the only Prometheus metrics endpoint (#6476)
Signed-off-by: Fabian Stäber <fabian@fstab.de>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-05-29 16:41:53 -05:00
jack-berg 0f99d70d98
Remove android animalsniffer check from prometheus exporter (#6478) 2024-05-29 16:02:39 -05:00
Fabian Stäber cdcc58cb87
Update the Prometetheus metrics library (#6473)
Signed-off-by: Fabian Stäber <fabian@fstab.de>
2024-05-28 11:50:04 -05:00
Kyle Moore a1c72d17e0
Normalize timestamps and file ordering in jars, making the outputs reproducible (#6471) 2024-05-28 11:44:23 -05:00
renovate[bot] dab1a6cc8f
Update dependency checkstyle to v10.17.0 (#6477)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-28 09:31:56 -07:00
lizongwu d3e3bdf6ec
Start prometheus httpserver with daemon thread (#6472) 2024-05-28 09:05:16 -05:00
renovate[bot] b6c30bccac
Update dependency org.assertj:assertj-bom to v3.26.0 (#6475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-26 09:51:05 -07:00
renovate[bot] a764419270
Update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2 (#6468)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-22 11:17:34 -07:00
renovate[bot] bb56b537ab
Update dependency io.netty:netty-bom to v4.1.110.Final (#6470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-22 10:54:35 -07:00
jack-berg c71c4d983c
Load file config YAML using core schema, ensure that env var substiut… (#6436) 2024-05-20 14:39:41 -05:00
renovate[bot] 7953048fe0
Update plugin org.graalvm.buildtools.native to v0.10.2 (#6466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-18 21:29:28 -07:00
renovate[bot] 37740b6c72
Update plugin com.gradle.develocity to v3.17.4 (#6465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-18 19:55:00 -07:00
renovate[bot] b1958e3fab
Update dependency org.owasp:dependency-check-gradle to v9.2.0 (#6462)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-17 09:38:46 -07:00
renovate[bot] d91b6e99d4
Update dependency com.google.api.grpc:proto-google-common-protos to v2.39.1 (#6463)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-16 15:30:20 -07:00
renovate[bot] 2e3e04c7e8
Update dependency io.grpc:grpc-bom to v1.64.0 (#6461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-15 18:54:22 -07:00
crossoverJie 9543a34518
Update otel.exporter.otlp.protocol default value (#6444) 2024-05-10 18:17:31 -07:00
OpenTelemetry Bot 1049897b2f
Post release for version 1.38.0 (#6453) 2024-05-10 18:16:15 -07:00
John Watson 672d154d04
add any new apidiff files to the resulting PR 2024-05-10 14:58:47 -07:00
John Watson 8d85b580b2
use the correct versions to regen the japicmp files (#6451) 2024-05-10 14:42:10 -07:00
John Watson 2b5ac31a5b
install java when running the post-release PR generation (#6450) 2024-05-10 12:37:58 -07:00
John Watson 9810e09a95
GHA for generating the post-release pull request (#6449) 2024-05-10 11:26:04 -07:00
renovate[bot] 0cf28e9dc9
Update plugin com.gradle.develocity to v3.17.3 (#6445)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 08:34:20 -07:00
OpenTelemetry Bot f4121777fe
Update version to 1.39.0 (#6447) 2024-05-10 10:21:49 -05:00
jack-berg 67fcea3846
Prepare for 1.38.0 release (#6441)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-05-10 10:06:14 -05:00
Trask Stalnaker a855e1296e
Mention branch protection ordering (#6406)
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-05-09 13:23:44 -05:00
jack-berg c7d472ad36
Stabilize synchronous gauge (#6419) 2024-05-09 13:10:53 -05:00
Takamasa Matsui ca798212a2
Restrict space-only keys (#6431) 2024-05-09 13:05:04 -05:00
jack-berg 0d2d67efe4
Add memory mode support to OTLP exporters (#6430) 2024-05-09 12:51:53 -05:00
jack-berg 715211e98b
Low allocation OTLP logs marshaler (#6429) 2024-05-09 10:47:14 -05:00
jack-berg 5297306064
Add Lauri to approvers (#6440) 2024-05-09 10:34:51 -05:00
renovate[bot] 417f82c3ca
Update dependency org.testcontainers:testcontainers-bom to v1.19.8 (#6437)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-09 07:54:45 -07:00
oliver zhang af46b5e4a9
change variable name (#6439) 2024-05-09 07:42:45 -07:00
John Bley a745d60e8d
Use standard ArrayList size rather than max number of links for initial span links allocation (#6252) 2024-05-07 08:42:15 -07:00
renovate[bot] 2e746690a9
Update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v1.9.24 (#6435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-07 08:22:33 -07:00
Lauri Tulmin 2454765174
Add private constructors for stateless marshalers (#6434) 2024-05-07 09:56:53 -05:00
Lauri Tulmin 996c9c321a
Low allocation OTLP metrics marshaler (#6422) 2024-05-07 09:56:01 -05:00
renovate[bot] 36bc703540
Update dependency com.fasterxml.jackson:jackson-bom to v2.17.1 (#6432)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-05 09:37:32 -07:00
Lauri Tulmin 2db5bb88d3
Marshal span status description without allocation (#6423) 2024-05-03 15:47:47 -05:00
renovate[bot] f8e6358b02
Update dependency com.uber.nullaway:nullaway to v0.10.26 (#6428)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 09:47:58 -07:00
renovate[bot] 83224d7079
Update dependency com.google.api.grpc:proto-google-common-protos to v2.39.0 (#6426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 07:49:17 -07:00
renovate[bot] 414cc7be5d
Update dependency com.google.guava:guava-bom to v33.2.0-jre (#6425)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-02 11:42:26 -07:00
renovate[bot] 68efd95b58
Update dependency com.google.guava:guava to v33.2.0-jre (#6424)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-02 11:42:00 -07:00
renovate[bot] b5699ade3b
Update errorProneVersion to v2.27.1 (#6420)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-01 18:11:28 -07:00
jack-berg 9b67fe09dc
Use low precision Clock#now when computing timestamp for exemplars (#6417) 2024-05-01 11:24:17 -05:00
renovate[bot] bd92087068
Update errorProneVersion to v2.27.0 (#6412)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: John K Watson <jkwatson@gmail.com>
2024-05-01 08:37:58 -07:00
Lauri Tulmin 2e59f5477f
Low allocation OTLP trace marshaler (#6410) 2024-05-01 10:03:37 -05:00
jack-berg e1f707e8dc
Fix opencensus shim spanBuilderWithRemoteParent behavior (#6415) 2024-05-01 10:00:36 -05:00
Serkan ÖZAL 35bc345f7e
Ignore TLS components (SSLContext, TrustManager, KeyManager) if plain HTTP protocol is used for exporting (#6329) 2024-04-30 15:09:02 -05:00
renovate[bot] 9845ac94bd
Update gradle/actions action to v3.3.2 (#6407)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-29 18:02:02 -05:00
renovate[bot] 5781da1121
Update dependency com.linecorp.armeria:armeria-bom to v1.28.4 (#6414)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-29 08:03:24 -07:00
renovate[bot] 7e34b79593
Update dependency checkstyle to v10.16.0 (#6413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-29 08:02:57 -07:00
renovate[bot] 51ff6bcf33
Update dependency com.linecorp.armeria:armeria-bom to v1.28.3 (#6408)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 12:53:10 -07:00
Lauri Tulmin 0e0f417760
Fix running tests with java 8 on macos (#6411)
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
2024-04-26 11:21:35 -05:00
Alexander Wert da4cd931f8
Add is_remote_parent span flags to OTLP exported Spans and SpanLinks (#6388)
Signed-off-by: Alexander Wert <alexander.wert@elastic.co>
2024-04-23 09:27:09 -05:00
jack-berg 8f791f2c61
PrometheusHttpServer prevent concurrent reads when reusable memory mode (#6371) 2024-04-22 09:47:15 -05:00
jack-berg a5fc312d26
Add missing fields to OTLP metric exporters (#6402) 2024-04-22 09:46:06 -05:00
renovate[bot] 1960606bce
Update dependency com.google.api.grpc:proto-google-common-protos to v2.38.0 (#6399)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-20 10:44:02 -07:00
renovate[bot] e22c562fa7
Update dependency gradle.plugin.io.morethan.jmhreport:gradle-jmh-report to v0.9.6 (#6404)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-19 20:53:20 -07:00
renovate[bot] b499bdc4ec
Update gradle/actions action to v3.3.1 (#6398)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 17:04:12 -05:00
jack-berg c33febbea6
Scope config (#6375) 2024-04-18 16:36:40 -05:00
jack-berg 1623a80d4c
Add put(AttributeKey<T>, T) overload to EventBuilder (#6331) 2024-04-18 13:36:39 -05:00
jack-berg feef40813f
Rename otel.config.file to otel.experimental.config.file (#6396) 2024-04-18 13:36:29 -05:00
renovate[bot] 7128a8a5ab
Update gradle/wrapper-validation-action action to v3 (#6387)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
2024-04-18 09:33:23 -05:00
renovate[bot] 9d955e6c0a
Update dependency io.zipkin.reporter2:zipkin-reporter-bom to v3.4.0 (#6386)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 09:32:33 -05:00
renovate[bot] ba9356192a
Update plugin com.gradle.develocity to v3.17.2 (#6393)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 09:32:22 -05:00
renovate[bot] 3b1092b3d5
Update dependency com.linecorp.armeria:armeria-bom to v1.28.2 (#6390)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 09:31:42 -05:00
renovate[bot] ecc8ffe09f
Update dependency io.netty:netty-bom to v4.1.109.Final (#6391)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 09:31:34 -05:00
jack-berg 7b4bb8fb0a
Add ReadableSpan#getAttributes (#6382) 2024-04-17 13:24:52 -05:00
renovate[bot] 8937a1009a
Update dependency com.linecorp.armeria:armeria-bom to v1.28.0 (#6384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-13 11:09:52 -07:00
renovate[bot] 6c6b678c76
Update slf4j monorepo to v2.0.13 (#6385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-13 11:09:33 -07:00
renovate[bot] 876408e7a7
Update gradle/wrapper-validation-action action to v2.1.3 (#6373)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-13 11:09:13 -07:00
renovate[bot] a85e888d82
Update dependency io.opentelemetry.proto:opentelemetry-proto to v1.2.0-alpha (#6365)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-11 14:53:10 -05:00
renovate[bot] 9e12dd60c4
Update dependency io.opentelemetry.semconv:opentelemetry-semconv-incubating to v1.25.0-alpha (#6366)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-04-11 13:01:53 -05:00
renovate[bot] 8242a4eb3e
Update plugin com.gradle.develocity to v3.17.1 (#6379)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-11 11:55:48 -05:00
renovate[bot] 63b91c6bd9
Update dependency io.zipkin.brave:brave-bom to v6.0.3 (#6376)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-11 11:54:59 -05:00
renovate[bot] bff0717a77
Update dependency com.tngtech.archunit:archunit-junit5 to v1.3.0 (#6380)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-11 11:54:41 -05:00
jason plumb 6c7770bb25
Add forward slash to InstrumentName log message (#6343) 2024-04-11 09:32:13 -05:00
jack-berg 1c64445cf6
Move away from deprecated gradle enterprise APIs (#6363) 2024-04-11 09:31:46 -05:00
jack-berg 7acc4e28f5
Mark opentelemetry-exporter-sender-jdk stable (#6357) 2024-04-10 17:18:23 -05:00
jack-berg 66cf1b6b28
Run build on java 21 (#6370) 2024-04-09 15:14:32 -05:00
renovate[bot] 92d659a17f
Update plugin io.github.gradle-nexus.publish-plugin to v2 (#6359)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 09:51:27 -05:00
jack-berg 001f34f170
Post release 1.37.0 (#6364) 2024-04-08 17:37:01 -05:00
renovate[bot] ab18dd6e55
Update dependency io.opentelemetry.semconv:opentelemetry-semconv to v1.24.0-alpha (#6362)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Berg <jberg@newrelic.com>
2024-04-08 13:42:18 -05:00
Trask Stalnaker bbcb2511d4
Tell renovate to update opentelemetry-proto and opentelemetry-semconv alpha artifacts (#6358) 2024-04-08 09:23:29 -05:00
jack-berg 572606ad50
Add additional API incubator docs (#6356) 2024-04-08 09:18:55 -05:00
OpenTelemetry Bot 1f80fe857d
Update version to 1.38.0 (#6354) 2024-04-05 13:02:57 -05:00
1356 changed files with 51600 additions and 12799 deletions

8
.clomonitor.yml Normal file
View File

@ -0,0 +1,8 @@
# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
exemptions:
- check: artifacthub_badge
reason: "Artifact Hub doesn't support Java packages"
- check: signed_releases
reason: "Maven central releases are signed and there are no GitHub release artifacts"
- check: openssf_badge
reason: "ETOOMANYBADGES, but the work has been done: https://www.bestpractices.dev/projects/9991"

View File

@ -11,7 +11,7 @@ coverage:
status:
project:
default:
target: 90%
target: 89%
paths:
- "!opencensus-shim/"
- "!opentracing-shim/"

40
.fossa.yml Normal file
View File

@ -0,0 +1,40 @@
version: 3
targets:
only:
- type: gradle
exclude:
# these modules are not published and so consumers will not be exposed to them
- type: gradle
path: ./
target: ':api:testing-internal'
- type: gradle
path: ./
target: ':exporters:otlp:testing-internal'
- type: gradle
path: ./
target: ':integration-tests'
- type: gradle
path: ./
target: ':integration-tests:graal'
- type: gradle
path: ./
target: ':integration-tests:graal-incubating'
- type: gradle
path: ./
target: ':integration-tests:otlp'
- type: gradle
path: ./
target: ':integration-tests:tracecontext'
- type: gradle
path: ./
target: ':perf-harness'
- type: gradle
path: ./
target: ':testing-internal'
experimental:
gradle:
configurations-only:
# consumer will only be exposed to these dependencies
- runtimeClasspath

View File

@ -1,7 +0,0 @@
{
"retryOn429": true,
"aliveStatusCodes": [
200,
403
]
}

View File

@ -1,36 +1,85 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:best-practices',
'helpers:pinGitHubActionDigestsToSemver',
],
"packageRules": [
packageRules: [
{
// this is to reduce the number of renovate PRs
matchManagers: [
'github-actions',
'dockerfile',
],
extends: [
'schedule:weekly',
],
groupName: 'weekly update',
},
{
matchPackageNames: [
'io.opentelemetry.contrib:opentelemetry-aws-xray-propagator',
'io.opentelemetry.proto:opentelemetry-proto',
'io.opentelemetry.semconv:opentelemetry-semconv-incubating',
],
// Renovate's default behavior is only to update from unstable -> unstable if it's for the
// major.minor.patch, under the assumption that you would want to update to the stable version
// of that release instead of the unstable version for a future release
// (TODO remove once the artifacts above release stable versions)
ignoreUnstable: false,
allowedVersions: '!/\\-SNAPSHOT$/',
},
{
// junit-pioneer 2+ requires Java 11+
"matchPackageNames": ["org.junit-pioneer:junit-pioneer"],
"matchUpdateTypes": ["major"],
"enabled": false
matchPackageNames: [
'org.junit-pioneer:junit-pioneer',
],
matchUpdateTypes: [
'major',
],
enabled: false,
},
{
// mockito 5+ requires Java 11+
"matchPackagePrefixes": ["org.mockito:"],
"matchUpdateTypes": ["major"],
"enabled": false
matchUpdateTypes: [
'major',
],
enabled: false,
matchPackageNames: [
'org.mockito:{/,}**',
],
},
{
// jqf-fuzz version 1.8+ requires Java 11+
"matchPackageNames": ["edu.berkeley.cs.jqf:jqf-fuzz"],
"matchUpdateTypes": ["major", "minor"],
"enabled": false
matchPackageNames: [
'edu.berkeley.cs.jqf:jqf-fuzz',
],
matchUpdateTypes: [
'major',
'minor',
],
enabled: false,
},
{
// pinned version for compatibility
"matchPackageNames": ["org.jetbrains.kotlinx:kotlinx-coroutines-core"],
"matchCurrentVersion": "1.5.2",
"enabled": false
matchPackageNames: [
'org.jetbrains.kotlinx:kotlinx-coroutines-core',
],
matchCurrentVersion: '1.5.2',
enabled: false,
},
{
"matchPackagePrefixes": ["com.diffplug.spotless"],
"groupName": "spotless packages"
groupName: 'spotless packages',
matchPackageNames: [
'com.diffplug.spotless{/,}**',
],
},
{
// equals verifier v4+ requires java 17+
groupName: 'nl.jqno.equalsverifier',
matchPackageNames: [ 'equalsverifier'],
matchUpdateTypes: [ 'major' ],
enabled: false
}
]
],
}

View File

@ -1,74 +1,24 @@
# Repository settings
Repository settings in addition to what's documented already at
<https://github.com/open-telemetry/community/blob/main/docs/how-to-configure-new-repository.md>.
## General > Pull Requests
* Allow squash merging > Default to pull request title
## Actions > General
* Fork pull request workflows from outside collaborators:
"Require approval for first-time contributors who are new to GitHub"
(To reduce friction for new contributors,
as the default is "Require approval for first-time contributors")
## Branch protections
### `main`
* Require branches to be up to date before merging: UNCHECKED
(PR jobs take too long, and leaving this unchecked has not been a significant problem)
* Status checks that are required:
* EasyCLA
* required-status-check
### `release/*`
Same settings as above for `main`, except:
* Restrict pushes that create matching branches: UNCHECKED
(So that opentelemetrybot can create release branches)
### `renovate/**/**`, and `opentelemetrybot/*`
* Require status checks to pass before merging: UNCHECKED
(So that renovate PRs can be rebased)
* Restrict who can push to matching branches: UNCHECKED
(So that bots can create PR branches in this repository)
* Allow force pushes > Everyone
(So that renovate PRs can be rebased)
* Allow deletions: CHECKED
(So that bot PR branches can be deleted)
### `benchmarks`
- Everything UNCHECKED
(This branch is currently only used for directly pushing benchmarking results from the
[overhead benchmark](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/benchmark.yml)
job)
This document describes any changes that have been made to the
settings in this repository outside the settings tracked in the
private admin repo.
## Secrets and variables > Actions
* `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
* `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
* `GRADLE_ENTERPRISE_ACCESS_KEY` - owned by [@jack-berg](https://github.com/jack-berg)
* Generated at https://ge.opentelemetry.io > My settings > Access keys
* format of env var is `ge.opentelemetry.io=<access key>`,
see [docs](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable)
* `SONATYPE_KEY` - owned by [@jack-berg](https://github.com/jack-berg)
* `SONATYPE_USER` - owned by [@jack-berg](https://github.com/jack-berg)
- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password
- Generated at https://nvd.nist.gov/developers/request-an-api-key
- Key is associated with [@trask](https://github.com/trask)'s gmail address
- `SONATYPE_KEY` - owned by [@jack-berg](https://github.com/jack-berg)
- `SONATYPE_USER` - owned by [@jack-berg](https://github.com/jack-berg)
### Organization secrets
- `FOSSA_API_KEY`
- `OTELBOT_PRIVATE_KEY`
### Organization variables
- `OTELBOT_APP_ID`

View File

@ -86,5 +86,5 @@ echo $contributors1 $contributors2 \
| grep -v github-actions \
| grep -v renovate \
| grep -v codecov \
| grep -v opentelemetrybot \
| grep -v otelbot \
| sed 's/^/@/'

22
.github/scripts/get-prior-version.sh vendored Executable file
View File

@ -0,0 +1,22 @@
version=$(.github/scripts/get-version.sh)
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
patch="${BASH_REMATCH[3]}"
else
echo "unexpected version: $version"
exit 1
fi
if [[ $patch == 0 ]]; then
if [[ $minor == 0 ]]; then
prior_major=$((major - 1))
prior_minor=$(grep -Po "^## Version $prior_major.\K[0-9]+" CHANGELOG.md | head -1)
prior_version="$prior_major.$prior_minor"
else
prior_version="$major.$((minor - 1)).0"
fi
else
prior_version="$major.$minor.$((patch - 1))"
fi
echo $prior_version

View File

@ -1,17 +0,0 @@
#!/bin/bash -e
# this script helps to reduce sporadic link check failures by retrying at a file-by-file level
retry_count=3
for file in "$@"; do
for i in $(seq 1 $retry_count); do
if markdown-link-check --config "$(dirname "$0")/../config/markdown-link-check-config.json" \
"$file"; then
break
elif [[ $i -eq $retry_count ]]; then
exit 1
fi
sleep 5
done
done

8
.github/scripts/update-version.sh vendored Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash -e
version=$1
versionWithSnapshot="$version-SNAPSHOT"
sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$version/" version.gradle.kts
sed -Ei "1 s/(Comparing source compatibility of [a-z-]+)-[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?.jar/\1-$versionWithSnapshot.jar/" docs/apidiffs/current_vs_latest/*.txt

View File

@ -1,4 +1,4 @@
#!/bin/bash -e
git config user.name opentelemetrybot
git config user.email 107717825+opentelemetrybot@users.noreply.github.com
git config user.name otelbot
git config user.email 197425009+otelbot@users.noreply.github.com

View File

@ -6,8 +6,13 @@ on:
description: "The pull request # to backport"
required: true
permissions:
contents: read
jobs:
backport:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
steps:
- run: |
@ -16,7 +21,7 @@ jobs:
exit 1
fi
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# history is needed to run git cherry-pick below
fetch-depth: 0
@ -24,16 +29,22 @@ jobs:
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
- name: Create pull request
env:
NUMBER: ${{ github.event.inputs.number }}
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
title=$(gh pr view $NUMBER --json title --jq .title)
branch="opentelemetrybot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
branch="otelbot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
git checkout -b $branch
git cherry-pick $commit

View File

@ -3,10 +3,15 @@ name: Benchmark Tags
on:
workflow_dispatch:
permissions:
contents: read
jobs:
sdk-benchmark:
permissions:
contents: write # for git push to benchmarks branch
name: Benchmark SDK
runs-on: self-hosted
runs-on: equinix-bare-metal
timeout-minutes: 10
strategy:
fail-fast: false
@ -39,23 +44,21 @@ jobs:
- v1.30.0
- v1.30.1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ matrix.tag-version }}
- id: setup-java
name: Set up Java for build
uses: actions/setup-java@v4
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
arguments: |
jmhJar
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Set up gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- name: Run jmh
run: ./gradlew jmhJar
- name: Run Benchmark
run: |
@ -63,7 +66,7 @@ jobs:
java -jar libs/opentelemetry-sdk-trace-*-jmh.jar -rf json SpanBenchmark SpanPipelineBenchmark ExporterBenchmark
- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1.20.4
with:
tool: 'jmh'
output-file-path: sdk/trace/build/jmh-result.json

View File

@ -5,27 +5,30 @@ on:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
sdk-benchmark:
permissions:
contents: write # for git push to benchmarks branch
name: Benchmark SDK
runs-on: self-hosted
runs-on: equinix-bare-metal
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: setup-java
name: Set up Java for build
uses: actions/setup-java@v4
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
arguments: |
jmhJar
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Set up gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- name: Run jmh
run: ./gradlew jmhJar
- name: Run Benchmark
run: |
@ -33,7 +36,7 @@ jobs:
java -jar libs/opentelemetry-sdk-trace-*-jmh.jar -rf json SpanBenchmark SpanPipelineBenchmark ExporterBenchmark
- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1.20.4
with:
tool: 'jmh'
output-file-path: sdk/trace/build/jmh-result.json

View File

@ -9,21 +9,27 @@ on:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Login to GitHub package registry
uses: docker/login-action@v3
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: integration-tests/tracecontext/docker
push: true

View File

@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Build
@ -21,50 +24,68 @@ jobs:
matrix:
os:
- macos-latest
- macos-13
- ubuntu-latest
- windows-latest
test-java-version:
- 8
- 11
- 17
- 20
- 21
- 23
# Collect coverage on latest LTS
include:
- os: ubuntu-20.04
test-java-version: 17
- os: ubuntu-latest
test-java-version: 21
coverage: true
jmh-based-tests: true
# macos-latest drops support for java 8 temurin. Run java 8 on macos-13. Run java 11, 17, 21 on macos-latest.
exclude:
- os: macos-latest
test-java-version: 8
- os: macos-13
test-java-version: 11
- os: macos-13
test-java-version: 17
- os: macos-13
test-java-version: 21
- os: macos-13
test-java-version: 23
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: setup-java-test
name: Set up Java ${{ matrix.test-java-version }} for tests
uses: actions/setup-java@v4
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: ${{ matrix.test-java-version }}
- id: setup-java
name: Set up Java for build
uses: actions/setup-java@v4
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
arguments: |
build
- name: Set up gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- name: Build
run: >
./gradlew build
${{ matrix.coverage && 'jacocoTestReport' || '' }}
-PtestJavaVersion=${{ matrix.test-java-version }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }}
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }}"
"-Porg.gradle.java.installations.auto-download=false"
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
# JMH-based tests run only if this environment variable is set to true
RUN_JMH_BASED_TESTS: ${{ matrix.jmh-based-tests }}
- name: Check for diff
# The jApiCmp diff compares current to latest, which isn't appropriate for release branches
if: ${{ !startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/') }}
# this fails on windows because of the bash-specific if/then/else syntax, but that's ok
# because we only need to run this validation once (on any platform)
if: ${{ matrix.os != 'windows-latest' && !startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/') }}
run: |
# need to "git add" in case any generated files did not already exist
git add docs/apidiffs
@ -78,12 +99,12 @@ jobs:
exit 1
fi
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
if: ${{ matrix.coverage }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ matrix.coverage }}
with:
name: coverage-report
@ -112,23 +133,27 @@ jobs:
name: publish-snapshots${{ (github.ref_name != 'main' || github.repository != 'open-telemetry/opentelemetry-java') && ' (skipped)' || '' }}
# intentionally not blocking snapshot publishing on markdown-link-check or misspell-check
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: setup-java
name: Set up Java
uses: actions/setup-java@v4
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- name: Set up gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
# skipping release branches because the versions in those branches are not snapshots
# (also this skips pull requests)
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' }}
- name: Publish to Sonatype
run: ./gradlew assemble publishToSonatype
# skipping release branches because the versions in those branches are not snapshots
# (also this skips pull requests)
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' }}
with:
arguments: assemble publishToSonatype
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
@ -136,13 +161,19 @@ jobs:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
build-graal:
name: Build GraalVM
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-graal-version:
- 21
- 23
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: graalvm/setup-graalvm@7f488cf82a3629ee755e4e97342c01d6bed318fa # v1.3.5
with:
# TODO(jack-berg): Which versions do we need to test? Should we use a matrix scheme?
java-version: '21'
java-version: ${{ matrix.test-graal-version }}
distribution: 'graalvm'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,43 +0,0 @@
name: CodeQL (daily)
on:
schedule:
# Daily at 01:30 (UTC)
- cron: '30 1 * * *'
workflow_dispatch:
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
# using "latest" helps to keep up with the latest Kotlin support
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
tools: latest
- uses: gradle/actions/setup-gradle@v3
with:
# skipping build cache is needed so that all modules will be analyzed
arguments: assemble --no-build-cache
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
open-issue-on-failure:
# open an issue on failure because it can be easy to miss CI failure notifications
needs:
- analyze
if: failure() && github.run_attempt == 1
uses: ./.github/workflows/reusable-open-issue-on-failure.yml

65
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,65 @@
name: CodeQL
on:
pull_request:
branches:
- main
- release/*
- benchmarks
push:
branches:
- main
- release/*
- benchmarks
schedule:
- cron: "23 16 * * 2" # weekly at 16:23 UTC on Tuesday
permissions:
contents: read
jobs:
analyze:
permissions:
contents: read
actions: read # for github/codeql-action/init to get workflow details
security-events: write # for github/codeql-action/analyze to upload SARIF results
strategy:
fail-fast: false
matrix:
include:
- language: actions
- language: java
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Java 17
if: matrix.language == 'java'
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- name: Set up gradle
if: matrix.language == 'java'
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- name: Initialize CodeQL
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
with:
languages: ${{ matrix.language }}
# using "latest" helps to keep up with the latest Kotlin support
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
tools: latest
- name: Assemble
if: matrix.language == 'java'
# --no-build-cache is required for codeql to analyze all modules
# --no-daemon is required for codeql to observe the compilation
# (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
run: ./gradlew assemble --no-build-cache --no-daemon
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
with:
category: "/language:${{matrix.language}}"

View File

@ -5,8 +5,14 @@ on:
- cron: "23 3 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
copy-images:
permissions:
contents: read
packages: write
strategy:
matrix:
include:
@ -21,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Docker login
uses: docker/login-action@v3
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}

20
.github/workflows/fossa.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: FOSSA
on:
push:
branches:
- main
permissions:
contents: read
jobs:
fossa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
with:
api-key: ${{secrets.FOSSA_API_KEY}}
team: OpenTelemetry

View File

@ -1,16 +1,16 @@
name: Gradle wrapper validation
on:
pull_request:
paths:
- '**/gradle/wrapper/**'
push:
paths:
- '**/gradle/wrapper/**'
pull_request:
permissions:
contents: read
jobs:
validation:
gradle-wrapper-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: gradle/wrapper-validation-action@v2.1.2
- uses: gradle/actions/wrapper-validation@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1

View File

@ -4,14 +4,21 @@ on:
issue_comment:
types: [created]
permissions:
contents: read
jobs:
issue_comment:
permissions:
contents: read
issues: write
pull-requests: write
if: >
contains(github.event.issue.labels.*.name, 'needs author feedback') &&
github.event.comment.user.login == github.event.issue.user.login
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Remove label
env:

View File

@ -5,11 +5,18 @@ on:
# hourly at minute 23
- cron: "23 * * * *"
permissions:
contents: read
jobs:
stale:
permissions:
contents: read
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 7

26
.github/workflows/javadoc-crawler.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Javadoc.io site crawler (daily)
on:
schedule:
- cron: "30 1 * * *" # daily at 1:30 UTC
workflow_dispatch:
permissions:
contents: read
jobs:
crawl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- name: Set up gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- name: Run crawler
run: ./gradlew :javadoc-crawler:crawl

47
.github/workflows/ossf-scorecard.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: OSSF Scorecard
on:
push:
branches:
- main
schedule:
- cron: "43 6 * * 5" # weekly at 06:43 (UTC) on Friday
workflow_dispatch:
permissions: read-all
jobs:
analysis:
runs-on: ubuntu-latest
permissions:
# Needed for Code scanning upload
security-events: write
# Needed for GitHub OIDC token if publish_results is true
id-token: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable
# uploads of run results in SARIF format to the repository Actions tab.
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
with:
sarif_file: results.sarif

View File

@ -4,27 +4,44 @@ name: OWASP dependency check (daily)
on:
schedule:
- cron: '30 1 * * *'
- cron: "30 1 * * *" # daily at 1:30 UTC
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-java@v4
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
arguments: "dependencyCheckAnalyze"
- name: Set up gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- name: Check dependencies
run: ./gradlew dependencyCheckAnalyze
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: javaagent/build/reports
workflow-notification:
permissions:
contents: read
issues: write
needs:
- analyze
if: always()
uses: ./.github/workflows/reusable-workflow-notification.yml
with:
success: ${{ needs.analyze.result == 'success' }}

View File

@ -2,11 +2,16 @@ name: Prepare patch release
on:
workflow_dispatch:
permissions:
contents: read
jobs:
prepare-patch-release:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: |
if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x$ ]]; then
@ -32,7 +37,7 @@ jobs:
echo "VERSION=$major_minor.$((patch + 1))" >> $GITHUB_ENV
- name: Update version
run: sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/" version.gradle.kts
run: .github/scripts/update-version.sh $VERSION
- name: Update the change log with the approximate release date
run: |
@ -42,13 +47,19 @@ jobs:
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
- name: Create pull request
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Prepare release $VERSION"
branch="opentelemetrybot/prepare-release-${VERSION}"
branch="otelbot/prepare-release-${VERSION}"
git checkout -b $branch
git commit -a -m "$message"

View File

@ -2,11 +2,14 @@ name: Prepare release branch
on:
workflow_dispatch:
permissions:
contents: read
jobs:
prereqs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Verify prerequisites
run: |
@ -21,11 +24,13 @@ jobs:
fi
create-pull-request-against-release-branch:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- prereqs
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Create release branch
run: |
@ -54,13 +59,19 @@ jobs:
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
- name: Create pull request against the release branch
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Prepare release $VERSION"
branch="opentelemetrybot/prepare-release-${VERSION}"
branch="otelbot/prepare-release-${VERSION}"
git checkout -b $branch
git commit -a -m "$message"
@ -70,11 +81,13 @@ jobs:
--base $RELEASE_BRANCH_NAME
create-pull-request-against-main:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- prereqs
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set environment variables
run: |
@ -87,11 +100,11 @@ jobs:
echo "unexpected version: $version"
exit 1
fi
echo "NEXT_VERSION=$next_version" >> $GITHUB_ENV
echo "NEXT_VERSION=${next_version}" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
- name: Update version
run: sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$NEXT_VERSION/" version.gradle.kts
run: .github/scripts/update-version.sh $NEXT_VERSION
- name: Update the change log on main
run: |
@ -102,14 +115,20 @@ jobs:
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
- name: Create pull request against main
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Update version to $NEXT_VERSION"
body="Update version to \`$NEXT_VERSION\`."
branch="opentelemetrybot/update-version-to-${NEXT_VERSION}"
branch="otelbot/update-version-to-${NEXT_VERSION}"
git checkout -b $branch
git commit -a -m "$message"

View File

@ -2,11 +2,17 @@ name: Release
on:
workflow_dispatch:
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-22.04
permissions:
contents: write # for creating the release
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.create-github-release.outputs.version }}
prior-version: ${{ steps.create-github-release.outputs.prior-version }}
steps:
- run: |
if [[ $GITHUB_REF_NAME != release/* ]]; then
@ -14,17 +20,18 @@ jobs:
exit 1
fi
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-java@v4
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 17
- name: Set up gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
- name: Build and publish artifacts
uses: gradle/actions/setup-gradle@v3
with:
arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
@ -58,7 +65,7 @@ jobs:
# check out main branch to verify there won't be problems with merging the change log
# at the end of this workflow
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: main
@ -73,7 +80,7 @@ jobs:
fi
# back to the release branch
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# tags are needed for the generate-release-contributors.sh script
fetch-depth: 0
@ -122,14 +129,20 @@ jobs:
--notes-file /tmp/release-notes.txt \
v$VERSION
# these are used as job outputs
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT
merge-change-log-to-main:
update-apidiff-baseline-and-docs-to-released-version:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- release
steps:
- uses: actions/checkout@v4
# add change log sync (if any) into this PR since the apidiff update
# is required before any other PR can be merged anyway
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Copy change log section from release branch
env:
@ -138,7 +151,7 @@ jobs:
sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \
> /tmp/changelog-section.md
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: main
@ -149,32 +162,59 @@ jobs:
run: |
release_date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
RELEASE_DATE=$release_date .github/scripts/merge-change-log-after-release.sh
git add CHANGELOG.md
- name: Use CLA approved github bot
- name: Wait for release to be available in maven central
env:
VERSION: ${{ needs.release.outputs.version }}
run: |
until curl --silent \
--show-error \
--output /dev/null \
--head \
--fail \
https://repo1.maven.org/maven2/io/opentelemetry/opentelemetry-api/$VERSION/opentelemetry-api-$VERSION.jar
do
sleep 60
done
- name: Update apidiff baseline
env:
VERSION: ${{ needs.release.outputs.version }}
PRIOR_VERSION: ${{ needs.release.outputs.prior-version }}
run: |
./gradlew japicmp -PapiBaseVersion=$PRIOR_VERSION -PapiNewVersion=$VERSION
./gradlew --refresh-dependencies japicmp
git add docs/apidiffs
- name: Update versions in README.md
env:
VERSION: ${{ needs.release.outputs.version }}
run: |
./gradlew updateVersionInDocs -Prelease.version=$VERSION
git add README.md
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-github-bot.sh
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
- name: Create pull request against main
env:
VERSION: ${{ needs.release.outputs.version }}
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
if git diff --quiet; then
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.0 ]]; then
echo there are no updates to merge, not creating pull request
exit 0 # success
else
echo patch release notes did not get applied for some reason
exit 1 # failure
fi
fi
message="Merge change log updates from $GITHUB_REF_NAME"
body="Merge log updates from \`$GITHUB_REF_NAME\`."
branch="opentelemetrybot/merge-change-log-updates-from-${GITHUB_REF_NAME//\//-}"
message="Update apidiff baseline and documentation versions to released version $VERSION"
body="Update apidiff baseline and documentation versions to released version \`$VERSION\`."
branch="otelbot/update-apidiff-baseline-and-documentation-to-released-version-${VERSION}"
git checkout -b $branch
git commit -a -m "$message"
git commit -m "$message"
git push --set-upstream origin $branch
gh pr create --title "$message" \
--body "$body" \

View File

@ -3,19 +3,22 @@ name: Reusable - Markdown link check
on:
workflow_call:
permissions:
contents: read
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install markdown-link-check
# TODO(jack-berg): use latest when config file reading bug is fixed: https://github.com/tcort/markdown-link-check/issues/246
run: npm install -g markdown-link-check@3.10.3
- name: Run markdown-link-check
run: |
find . -type f \
-name '*.md' \
-not -path './CHANGELOG.md' \
| xargs .github/scripts/markdown-link-check-with-retry.sh
- uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
with:
# excluding links to pull requests and issues is done for performance
args: >
--include-fragments
--exclude "^https://github.com/open-telemetry/opentelemetry-java/(issues|pull)/\\d+$"
--max-retries 6
--retry-wait-time 10
--max-concurrency 1
.

View File

@ -3,11 +3,14 @@ name: Reusable - Misspell check
on:
workflow_call:
permissions:
contents: read
jobs:
misspell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install misspell
run: |

View File

@ -3,11 +3,17 @@ name: Reusable - Open issue on workflow failure
on:
workflow_call:
permissions:
contents: read
jobs:
open-issue:
permissions:
contents: read
issues: write # for creating the issue
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Open issue
env:

View File

@ -0,0 +1,44 @@
# this is useful because notifications for scheduled workflows are only sent to the user who
# initially created the given workflow
name: Reusable - Workflow notification
on:
workflow_call:
inputs:
success:
type: boolean
required: true
permissions:
contents: read
jobs:
workflow-notification:
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Open issue or add comment if issue already open
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# TODO (trask) search doesn't support exact phrases, so it's possible that this could grab the wrong issue
number=$(gh issue list --search "in:title Workflow failed: $GITHUB_WORKFLOW" --limit 1 --json number -q .[].number)
echo $number
echo ${{ inputs.success }}
if [[ $number ]]; then
if [[ "${{ inputs.success }}" == "true" ]]; then
gh issue close $number
else
gh issue comment $number \
--body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
fi
elif [[ "${{ inputs.success }}" == "false" ]]; then
gh issue create --title "Workflow failed: $GITHUB_WORKFLOW (#$GITHUB_RUN_NUMBER)" \
--body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
fi

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
# Gradle
build
.gradle
.kotlin
local.properties
out/

View File

@ -2,6 +2,751 @@
## Unreleased
## Version 1.52.0 (2025-07-11)
### API
#### Common
* Promote `ComponentLoader` to new `opentelemetry-common` artifact,
standardize SPI loading
([#7446](https://github.com/open-telemetry/opentelemetry-java/pull/7446))
#### Context
* LazyStorage passes its ClassLoader when loading ContextStorageProvider SPI
([#7424](https://github.com/open-telemetry/opentelemetry-java/pull/7424))
#### Incubator
* Add context and severity params to ExtendedLogger#isEnabled
([#7268](https://github.com/open-telemetry/opentelemetry-java/pull/7268))
* Add new convenience methods for converting DeclarativeConfigProperties to config model
([#7453](https://github.com/open-telemetry/opentelemetry-java/pull/7453))
### SDK
* Add custom stacktrace renderer which is length limit aware
([#7281](https://github.com/open-telemetry/opentelemetry-java/pull/7281))
#### Metrics
* Propagate flush to PeriodicMetricReader's metricExporter.
([#7410](https://github.com/open-telemetry/opentelemetry-java/pull/7410))
#### Exporters
* OTLP - JdkHttpSender: ensure proper closure of HttpClient in shutdown method
([#7390](https://github.com/open-telemetry/opentelemetry-java/pull/7390))
* OTLP: profile exporters fix and test improvements
([#7442](https://github.com/open-telemetry/opentelemetry-java/pull/7442))
* OTLP: Loading Compressor SPI via ComponentLoader configured through setComponentLoader
([#7428](https://github.com/open-telemetry/opentelemetry-java/pull/7428))
* Prometheus: add scope schema URL and attributes
([#7356](https://github.com/open-telemetry/opentelemetry-java/pull/7356))
* Prometheus: extend prometheus declarative config support to include without_scope_info,
with_resource_constant_labels
([#6840](https://github.com/open-telemetry/opentelemetry-java/pull/6840))
#### Extensions
* Autoconfigure: fix race condition of `GlobalOpenTelemetry` initialization with
`AutoConfiguredOpenTelemetrySdkBuilder`
([#7365](https://github.com/open-telemetry/opentelemetry-java/pull/7365))
* Declarative config: update to declarative config 1.0-rc.1
([#7436](https://github.com/open-telemetry/opentelemetry-java/pull/7436))
* Declarative config: resolve environment variable substitution for mixed quotes
([#7433](https://github.com/open-telemetry/opentelemetry-java/pull/7433))
## Version 1.51.0 (2025-06-06)
### API
#### Context
* Fix context storage provider property name in log message
([#7342](https://github.com/open-telemetry/opentelemetry-java/pull/7342))
### SDK
* Experimental configurable exception.* attribute resolution for SdkTracerProvider,
SdkLoggerProvider
([#7266](https://github.com/open-telemetry/opentelemetry-java/pull/7266))
#### Exporters
* All exporters: implement new SemConv exporter health metrics, with configuration API for selecting
schema version
([#7265](https://github.com/open-telemetry/opentelemetry-java/pull/7265))
* OTLP: Add gRPC export for profiles signal type.
([#7301](https://github.com/open-telemetry/opentelemetry-java/pull/7301))
* OTLP: Run JDK HTTP sender on non-daemon threads.
([#7322](https://github.com/open-telemetry/opentelemetry-java/pull/7322))
* Prometheus: fix serialization of arrays
([#7291](https://github.com/open-telemetry/opentelemetry-java/pull/7291))
* OTLP: exporter tolerates instances of LogRecordData when incubator is present
([#7393](https://github.com/open-telemetry/opentelemetry-java/pull/7393))
#### Extensions
* Declarative config: Handle instrumentation node changes in yaml config file format 0.4
([#7357](https://github.com/open-telemetry/opentelemetry-java/pull/7357))
## Version 1.50.0 (2025-05-09)
### API
* Clarify that AttributesBuilder.put allows nulls
([#7271](https://github.com/open-telemetry/opentelemetry-java/pull/7271))
* Stabilize log record event name
([#7277](https://github.com/open-telemetry/opentelemetry-java/pull/7277))
#### Context
* Fix duplicated ExecutorService wrap
([#7245](https://github.com/open-telemetry/opentelemetry-java/pull/7245))
* Promote getAll to TextMapGetter stable API
([#7267](https://github.com/open-telemetry/opentelemetry-java/pull/7267))
#### Incubator
* Add ExtendedLogRecordBuilder#setException
([#7182](https://github.com/open-telemetry/opentelemetry-java/pull/7182))
* Add experimental support for log extended attributes
([#7123](https://github.com/open-telemetry/opentelemetry-java/pull/7123))
### SDK
* Remove Java9VersionSpecific clock implementation
([#7221](https://github.com/open-telemetry/opentelemetry-java/pull/7221))
* Add addProcessorFirst to SdkTracerProviderBuilder, SdkLoggerProviderBuilder
([#7243](https://github.com/open-telemetry/opentelemetry-java/pull/7243))
#### Logs
* Add `setLoggerConfigurator` support to `LoggerProvider`
([#7332](https://github.com/open-telemetry/opentelemetry-java/pull/7332))
#### Metrics
* Add DelegatingMetricData
([#7229](https://github.com/open-telemetry/opentelemetry-java/pull/7229))
* Spatial aggregation for async instruments with filtering views
([#7264](https://github.com/open-telemetry/opentelemetry-java/pull/7264))
#### Exporters
* Prometheus: Add Authenticator support for PrometheusHttpServer
([#7225](https://github.com/open-telemetry/opentelemetry-java/pull/7225))
* OTLP: Fix OTLP metric exporter toBuilder() loosing temporality
([#7280](https://github.com/open-telemetry/opentelemetry-java/pull/7280))
* OTLP: Allow Otlp*MetricExporter's to publish export stats
([#7255](https://github.com/open-telemetry/opentelemetry-java/pull/7255))
#### Extensions
* Declarative config: Add support for escaping env var substitution
([#7033](https://github.com/open-telemetry/opentelemetry-java/pull/7033))
* Declarative config: update to opentelemetry-configuration 0.4
([#7064](https://github.com/open-telemetry/opentelemetry-java/pull/7064))
* Declarativeconfig: Refactor internals to add DeclarativeConfigContext
([#7293](https://github.com/open-telemetry/opentelemetry-java/pull/7293))
### Project tooling
* Kotlin extension: Update min kotlin version to 1.8
([#7155](https://github.com/open-telemetry/opentelemetry-java/pull/7155))
* Add javadoc site crawler
([#7300](https://github.com/open-telemetry/opentelemetry-java/pull/7300),
[#7316](https://github.com/open-telemetry/opentelemetry-java/pull/7316))
## Version 1.49.0 (2025-04-04)
### SDK
#### Trace
* Avoid linear queue.size() calls in span producers by storing queue size separately
([#7141](https://github.com/open-telemetry/opentelemetry-java/pull/7141))
#### Exporters
* OTLP: Add support for setting exporter executor service
([#7152](https://github.com/open-telemetry/opentelemetry-java/pull/7152))
* OTLP: Refine delay jitter for exponential backoff
([#7206](https://github.com/open-telemetry/opentelemetry-java/pull/7206))
#### Extensions
* Autoconfigure: Remove support for otel.experimental.exporter.otlp.retry.enabled
([#7200](https://github.com/open-telemetry/opentelemetry-java/pull/7200))
* Autoconfigure: Add stable cardinality limit property otel.java.metrics.cardinality.limit
([#7199](https://github.com/open-telemetry/opentelemetry-java/pull/7199))
* Incubator: Add declarative config model customizer SPI
([#7118](https://github.com/open-telemetry/opentelemetry-java/pull/7118))
## Version 1.48.0 (2025-03-07)
### API
* Add some helpful logging attribute methods to `LogRecordBuilder`
([#7089](https://github.com/open-telemetry/opentelemetry-java/pull/7089))
#### Incubator
* Introduce ConfigProvider API. Rename `StructuredConfigProperties` to `DeclarativeConfigProperties`
and move to `opentelemetry-api-incubator`. Rename `FileConfiguration`
to `DeclarativeConfiguration`.
([#6549](https://github.com/open-telemetry/opentelemetry-java/pull/6549))
### SDK
* Log warning and adjust when BatchLogRecordProcessor, BatchSpanProcessor `maxExportBatchSize`
exceeds `maxQueueSize`.
([#7045](https://github.com/open-telemetry/opentelemetry-java/pull/7045),
[#7148](https://github.com/open-telemetry/opentelemetry-java/pull/7148))
* Fix bug causing `ThrottlingLogger` to log more than once per minute
([#7156](https://github.com/open-telemetry/opentelemetry-java/pull/7156))
#### Metrics
* Remove obsolete `SdkMeterProviderUtil#setCardinalitylimit` API
([#7169](https://github.com/open-telemetry/opentelemetry-java/pull/7169))
#### Traces
* Fix bug preventing accurate reporting of span event dropped attribute count
([#7142](https://github.com/open-telemetry/opentelemetry-java/pull/7142))
#### Exporters
* OTLP: remove support for `otel.java.experimental.exporter.memory_mode`
which was previously replaced by `otel.java.exporter.memory_mode`
([#7127](https://github.com/open-telemetry/opentelemetry-java/pull/7127))
* OTLP: Extract sender parameters to config carrier class
(incubating API)
([#7151](https://github.com/open-telemetry/opentelemetry-java/pull/7151))
* OTLP: Add support for setting OTLP exporter service class loader
([#7150](https://github.com/open-telemetry/opentelemetry-java/pull/7150))
### Tooling
* Update android animalsniffer min API version to 23
([#7153](https://github.com/open-telemetry/opentelemetry-java/pull/7153))
## Version 1.47.0 (2025-02-07)
### API
#### Incubator
* Make `ExtendedTracer` easier to use
([#6943](https://github.com/open-telemetry/opentelemetry-java/pull/6943))
* Add `ExtendedLogRecordBuilder#setEventName` and corresponding SDK and OTLP serialization
([#7012](https://github.com/open-telemetry/opentelemetry-java/pull/7012))
* BREAKING: Drop event API / SDK
([#7053](https://github.com/open-telemetry/opentelemetry-java/pull/7053))
### SDK
* Remove -alpha artifacts from runtime classpath of stable components
([#6944](https://github.com/open-telemetry/opentelemetry-java/pull/6944))
#### Traces
* Bugfix: Follow spec on span limits, batch processors
([#7030](https://github.com/open-telemetry/opentelemetry-java/pull/7030))
* Add experimental `SdkTracerProvider.setScopeConfigurator(ScopeConfigurator)` for
updating `TracerConfig` at runtime
([#7021](https://github.com/open-telemetry/opentelemetry-java/pull/7021))
#### Profiles
* Add AttributeKeyValue abstraction to common otlp exporters
([#7026](https://github.com/open-telemetry/opentelemetry-java/pull/7026))
* Improve profiles attribute table handling
([#7031](https://github.com/open-telemetry/opentelemetry-java/pull/7031))
#### Exporters
* Interpret timeout zero value as no limit
([#7023](https://github.com/open-telemetry/opentelemetry-java/pull/7023))
* Bugfix - OTLP: Fix concurrent span reusable data marshaler
([#7041](https://github.com/open-telemetry/opentelemetry-java/pull/7041))
* OTLP: Add ability to customize retry exception predicate
([#6991](https://github.com/open-telemetry/opentelemetry-java/pull/6991))
* OTLP: Expand default OkHttp sender retry exception predicate
([#7047](https://github.com/open-telemetry/opentelemetry-java/pull/7047),
[#7057](https://github.com/open-telemetry/opentelemetry-java/pull/7057))
#### Extensions
* Autoconfigure: Consistent application of exporter customizers when otel.{signal}.exporter=none
([#7017](https://github.com/open-telemetry/opentelemetry-java/pull/7017))
* Autoconfigure: Promote EnvironmentResourceProvider to public API
([#7052](https://github.com/open-telemetry/opentelemetry-java/pull/7052))
* Autoconfigure: Ensure `OTEL_PROPAGATORS` still works when `OTEL_SDK_DISABLED=true`.
([#7062](https://github.com/open-telemetry/opentelemetry-java/pull/7062))%
#### Testing
* Add W3CBaggagePropagator to `OpenTelemetryRule`, `OpenTelemetryExtension`.
([#7056](https://github.com/open-telemetry/opentelemetry-java/pull/7056))
## Version 1.46.0 (2025-01-10)
### SDK
* Remove unused dependencies, cleanup code after stabilizing Value
([#6948](https://github.com/open-telemetry/opentelemetry-java/pull/6948))
* Explicitly allow null into CompletableResultCode.failExceptionally()
([#6963](https://github.com/open-telemetry/opentelemetry-java/pull/6963))
#### Traces
* Fix span setStatus
([#6990](https://github.com/open-telemetry/opentelemetry-java/pull/6990))
#### Logs
* Add getters/accessors for readable fields in ReadWriteLogRecord.
([#6924](https://github.com/open-telemetry/opentelemetry-java/pull/6924))
#### Exporters
* OTLP: Update to opentelemetry-proto 1.5
([#6999](https://github.com/open-telemetry/opentelemetry-java/pull/6999))
* Bugfix - OTLP: Ensure Serializer runtime exceptions are rethrown as IOException
([#6969](https://github.com/open-telemetry/opentelemetry-java/pull/6969))
* BREAKING - OTLP: Delete experimental OTLP authenticator concept.
See [OTLP authentication docs](https://opentelemetry.io/docs/languages/java/sdk/#authentication)
for supported solutions.
([#6984](https://github.com/open-telemetry/opentelemetry-java/pull/6984))
#### Extensions
* BREAKING - Autoconfigure: Remove support for deprecated otel.experimental.resource.disabled.keys
([#6931](https://github.com/open-telemetry/opentelemetry-java/pull/6931))
## Version 1.45.0 (2024-12-06)
### API
* Add convenience method `setAttribute(Attribute<Long>, int)` to SpanBuilder (matching the existing
convenience method in Span)
([#6884](https://github.com/open-telemetry/opentelemetry-java/pull/6884))
* Extends TextMapGetter with experimental GetAll() method, implement usage in W3CBaggagePropagator
([#6852](https://github.com/open-telemetry/opentelemetry-java/pull/6852))
### SDK
#### Traces
* Add synchronization to SimpleSpanProcessor to ensure thread-safe export of spans
([#6885](https://github.com/open-telemetry/opentelemetry-java/pull/6885))
#### Metrics
* Lazily initialize ReservoirCells
([#6851](https://github.com/open-telemetry/opentelemetry-java/pull/6851))
#### Logs
* Add synchronization to SimpleLogRecordProcessor to ensure thread-safe export of logs
([#6885](https://github.com/open-telemetry/opentelemetry-java/pull/6885))
#### Exporters
* OTLP: Update opentelementry-proto to 1.4
([#6906](https://github.com/open-telemetry/opentelemetry-java/pull/6906))
* OTLP: Rename internal Marshaler#writeJsonToGenerator method to allow jackson runtimeOnly dependency
([#6896](https://github.com/open-telemetry/opentelemetry-java/pull/6896))
* OTLP: Fix repeated string serialization for JSON.
([#6888](https://github.com/open-telemetry/opentelemetry-java/pull/6888))
* OTLP: Fix missing unsafe available check
([#6920](https://github.com/open-telemetry/opentelemetry-java/pull/6920))
#### Extensions
* Declarative config: Don't require empty objects when referencing custom components
([#6891](https://github.com/open-telemetry/opentelemetry-java/pull/6891))
### Tooling
* Add javadoc boilerplate internal comment v2 for experimental classes
([#6886](https://github.com/open-telemetry/opentelemetry-java/pull/6886))
* Update develocity configuration
([#6903](https://github.com/open-telemetry/opentelemetry-java/pull/6903))
## Version 1.44.1 (2024-11-10)
### SDK
#### Traces
* Fix regression in event attributes
([#6865](https://github.com/open-telemetry/opentelemetry-java/pull/6865))
## Version 1.44.0 (2024-11-08)
### API
* Fix ConfigUtil#getString ConcurrentModificationException
([#6841](https://github.com/open-telemetry/opentelemetry-java/pull/6841))
### SDK
#### Traces
* Stabilize ExceptionEventData
([#6795](https://github.com/open-telemetry/opentelemetry-java/pull/6795))
#### Metrics
* Stabilize metric cardinality limits
([#6794](https://github.com/open-telemetry/opentelemetry-java/pull/6794))
* Refactor metrics internals to remove MeterSharedState
([#6845](https://github.com/open-telemetry/opentelemetry-java/pull/6845))
#### Exporters
* Add memory mode option to stdout exporters
([#6774](https://github.com/open-telemetry/opentelemetry-java/pull/6774))
* Log a warning if OTLP endpoint port is likely incorrect given the protocol
([#6813](https://github.com/open-telemetry/opentelemetry-java/pull/6813))
* Fix OTLP gRPC retry mechanism for unsuccessful HTTP responses
([#6829](https://github.com/open-telemetry/opentelemetry-java/pull/6829))
* Add ByteBuffer field type marshaling support
([#6686](https://github.com/open-telemetry/opentelemetry-java/pull/6686))
* Fix stdout exporter format by adding newline after each export
([#6848](https://github.com/open-telemetry/opentelemetry-java/pull/6848))
* Enable `reusuable_data` memory mode by default for `OtlpGrpc{Signal}Exporter`,
`OtlpHttp{Signal}Exporter`, `OtlpStdout{Signal}Exporter`, and `PrometheusHttpServer`
([#6799](https://github.com/open-telemetry/opentelemetry-java/pull/6799))
#### Extension
* Rebrand file configuration to declarative configuration in documentation
([#6812](https://github.com/open-telemetry/opentelemetry-java/pull/6812))
* Fix declarative config `file_format` validation
([#6786](https://github.com/open-telemetry/opentelemetry-java/pull/6786))
* Fix declarative config env substitution by disallowing '}' in default value
([#6793](https://github.com/open-telemetry/opentelemetry-java/pull/6793))
* Set declarative config default OTLP protocol to http/protobuf
([#6800](https://github.com/open-telemetry/opentelemetry-java/pull/6800))
* Stabilize autoconfigure disabling of resource keys via `otel.resource.disabled.keys`
([#6809](https://github.com/open-telemetry/opentelemetry-java/pull/6809))
### Tooling
* Run tests on Java 23
([#6825](https://github.com/open-telemetry/opentelemetry-java/pull/6825))
* Test Windows in CI
([#6824](https://github.com/open-telemetry/opentelemetry-java/pull/6824))
* Add error prone checks for internal javadoc and private constructors
([#6844](https://github.com/open-telemetry/opentelemetry-java/pull/6844))
## Version 1.43.0 (2024-10-11)
### API
* Add helper class to capture context using ScheduledExecutorService
([#6712](https://github.com/open-telemetry/opentelemetry-java/pull/6712))
* Adds Baggage.getEntry(String key)
([#6765](https://github.com/open-telemetry/opentelemetry-java/pull/6765))
#### Extensions
* Fix ottracepropagation for short span ids
([#6734](https://github.com/open-telemetry/opentelemetry-java/pull/6734))
### SDK
#### Metrics
* Optimize advice with FilteredAttributes
([#6633](https://github.com/open-telemetry/opentelemetry-java/pull/6633))
#### Exporters
* Add experimental stdout log, metric, trace exporters for printing records to stdout in standard
OTLP JSON format.
([#6675](https://github.com/open-telemetry/opentelemetry-java/pull/6675), [#6750](https://github.com/open-telemetry/opentelemetry-java/pull/6750))
* Add Marshalers for profiling signal type
([#6680](https://github.com/open-telemetry/opentelemetry-java/pull/6680))
#### Extensions
* Add `*Model` suffix to declarative config generated classes.
([#6721](https://github.com/open-telemetry/opentelemetry-java/pull/6721))
* Use autoconfigured ClassLoader to load declarative config
([#6725](https://github.com/open-telemetry/opentelemetry-java/pull/6725))
* Update declarative config to use opentelemetry-configuration v0.3.0
([#6733](https://github.com/open-telemetry/opentelemetry-java/pull/6733))
* Add `StructuredConfigProperties#getStructured` default method,
add `StructuredConfigProperties.empty()`
([#6759](https://github.com/open-telemetry/opentelemetry-java/pull/6759))
#### Testing
* Add context info about wrong span or trace.
([#6703](https://github.com/open-telemetry/opentelemetry-java/pull/6703))
## Version 1.42.1 (2024-09-10)
### API
* Revert `java-test-fixtures` plugin to remove test dependencies from `pom.xml`.
([#6695](https://github.com/open-telemetry/opentelemetry-java/pull/6695))
## Version 1.42.0 (2024-09-06)
### API
* BREAKING: Stabilize log support for AnyValue bodies. Rename `AnyValue` to `Value`, promote
from `opentelemetry-api-incubator` to `opentelemetry-api`, change package
from `io.opentelemetry.api.incubator.logs` to `io.opentelemetry.api.common`.
([#6591](https://github.com/open-telemetry/opentelemetry-java/pull/6591))
* Noop implementations detect when `opentelemetry-api-incubator` is present and return extended noop
implementations.
([#6617](https://github.com/open-telemetry/opentelemetry-java/pull/6617))%
### SDK
#### Traces
* Added experimental support for SpanProcessor OnEnding callback
([#6367](https://github.com/open-telemetry/opentelemetry-java/pull/6367))
* Remove final modifier from SdkTracer.tracerEnabled
([#6687](https://github.com/open-telemetry/opentelemetry-java/pull/6687))
#### Exporters
* Suppress zipkin exporter instrumentation
([#6552](https://github.com/open-telemetry/opentelemetry-java/pull/6552))
* OTLP exporters return status code exceptions via CompletableResultCode in GrpcExporter and
HttpExporter.
([#6645](https://github.com/open-telemetry/opentelemetry-java/pull/6645))
* Align GrpcSender contract with HttpSender
([#6658](https://github.com/open-telemetry/opentelemetry-java/pull/6658))
#### Extensions
* Add autoconfigure support for ns and us durations
([#6654](https://github.com/open-telemetry/opentelemetry-java/pull/6654))
* Add declarative configuration ComponentProvider support for resources
([#6625](https://github.com/open-telemetry/opentelemetry-java/pull/6625))
* Add declarative configuration ComponentProvider support for processors
([#6623](https://github.com/open-telemetry/opentelemetry-java/pull/6623))
* Add declarative configuration ComponentProvider support for samplers
([#6494](https://github.com/open-telemetry/opentelemetry-java/pull/6494))
* Add declarative configuration ComponentProvider support for propagators
([#6624](https://github.com/open-telemetry/opentelemetry-java/pull/6624))
* Add declarative configuration missing pieces
([#6677](https://github.com/open-telemetry/opentelemetry-java/pull/6677))
* Change jaeger remote sampler autoconfigure property from `pollingInterval` to `pollingIntervalMs`
to match spec.
([#6672](https://github.com/open-telemetry/opentelemetry-java/pull/6672))
#### Testing
* Add asserts for log record body fields
([#6509](https://github.com/open-telemetry/opentelemetry-java/pull/6509))
## Version 1.41.0 (2024-08-09)
### API
* Move experimental suppress instrumentation context key to api internal package
([#6546](https://github.com/open-telemetry/opentelemetry-java/pull/6546))
#### Incubator
* Fix bug in `ExtendedContextPropagators` preventing context extraction when case is incorrect.
([#6569](https://github.com/open-telemetry/opentelemetry-java/pull/6569))
### SDK
* Extend `CompletableResultCode` with `failExceptionally(Throwable)`.
([#6348](https://github.com/open-telemetry/opentelemetry-java/pull/6348))
#### Metrics
* Avoid allocations when experimental advice doesn't remove any attributes.
([#6629](https://github.com/open-telemetry/opentelemetry-java/pull/6629))
#### Exporter
* Enable retry by default for OTLP exporters.
([#6588](https://github.com/open-telemetry/opentelemetry-java/pull/6588))
* Retry ConnectException, add retry logging.
([#6614](https://github.com/open-telemetry/opentelemetry-java/pull/6614))
* Extend `PrometheusHttpServer` with ability to configure default aggregation as function of
instrument kind, including experimental env var support.
([#6541](https://github.com/open-telemetry/opentelemetry-java/pull/6541))
* Add exporter data model impl for profiling signal type.
([#6498](https://github.com/open-telemetry/opentelemetry-java/pull/6498))
* Add Marshalers for profiling signal type.
([#6565](https://github.com/open-telemetry/opentelemetry-java/pull/6565))
* Use generateCertificates() of CertificateFactory to process certificates.
([#6579](https://github.com/open-telemetry/opentelemetry-java/pull/6579))
#### Extensions
* Add file configuration ComponentProvider support for exporters.
([#6493](https://github.com/open-telemetry/opentelemetry-java/pull/6493))
* Remove nullable from file config Factory contract.
([#6612](https://github.com/open-telemetry/opentelemetry-java/pull/6612))
## Version 1.40.0 (2024-07-05)
### API
#### Incubator
* Narrow ExtendedSpanBuilder return types for chaining
([#6514](https://github.com/open-telemetry/opentelemetry-java/pull/6514))
* Add APIs to determine if tracer, logger, instruments are enabled
([#6502](https://github.com/open-telemetry/opentelemetry-java/pull/6502))
### SDK
#### Extensions
* Move autoconfigure docs to opentelemetry.io
([#6491](https://github.com/open-telemetry/opentelemetry-java/pull/6491))
## Version 1.39.0 (2024-06-07)
### API
#### Incubator
* BREAKING: Refactor ExtendedTracer, ExtendedSpanBuilder to reflect incubating API conventions
([#6497](https://github.com/open-telemetry/opentelemetry-java/pull/6497))
### SDK
#### Exporter
* BREAKING: Serve prometheus metrics only on `/metrics` by default. To restore the previous behavior
and serve metrics on all paths, override the default handler
as [demonstrated here](https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServerTest.java#L251-L259).
([#6476](https://github.com/open-telemetry/opentelemetry-java/pull/6476))
* Make OTLP exporter memory mode API public
([#6469](https://github.com/open-telemetry/opentelemetry-java/pull/6469))
* Speed up OTLP string marshaling using sun.misc.Unsafe
([#6433](https://github.com/open-telemetry/opentelemetry-java/pull/6433))
* Add exporter data classes for experimental profiling signal type.
([#6374](https://github.com/open-telemetry/opentelemetry-java/pull/6374))
* Start prometheus http server with daemon thread
([#6472](https://github.com/open-telemetry/opentelemetry-java/pull/6472))
* Update the Prometheus metrics library and improve how units are included in metric names.
([#6473](https://github.com/open-telemetry/opentelemetry-java/pull/6473))
* Remove android animalsniffer check from prometheus exporter
([#6478](https://github.com/open-telemetry/opentelemetry-java/pull/6478))
#### Extensions
* Load file config YAML using core schema, ensure that env var substitution retains string types.
([#6436](https://github.com/open-telemetry/opentelemetry-java/pull/6436))
* Define dedicated file configuration SPI ComponentProvider
([#6457](https://github.com/open-telemetry/opentelemetry-java/pull/6457))
### Tooling
* Normalize timestamps and file ordering in jars, making the outputs reproducible
([#6471](https://github.com/open-telemetry/opentelemetry-java/pull/6471))
* GHA for generating the post-release pull request
([#6449](https://github.com/open-telemetry/opentelemetry-java/pull/6449))
## Version 1.38.0 (2024-05-10)
### API
* Stabilize synchronous gauge
([#6419](https://github.com/open-telemetry/opentelemetry-java/pull/6419))
#### Incubator
* Add put(AttributeKey<T>, T) overload to EventBuilder
([#6331](https://github.com/open-telemetry/opentelemetry-java/pull/6331))
#### Baggage
* Baggage filters space-only keys
([#6431](https://github.com/open-telemetry/opentelemetry-java/pull/6431))
### SDK
* Add experimental scope config to enable / disable scopes (i.e. meter, logger, tracer)
([#6375](https://github.com/open-telemetry/opentelemetry-java/pull/6375))
#### Traces
* Add ReadableSpan#getAttributes
([#6382](https://github.com/open-telemetry/opentelemetry-java/pull/6382))
* Use standard ArrayList size rather than max number of links for initial span links allocation
([#6252](https://github.com/open-telemetry/opentelemetry-java/pull/6252))
#### Metrics
* Use low precision Clock#now when computing timestamp for exemplars
([#6417](https://github.com/open-telemetry/opentelemetry-java/pull/6417))
* Update invalid instrument name log message now that forward slash `/` is valid
([#6343](https://github.com/open-telemetry/opentelemetry-java/pull/6343))
#### Exporters
* Introduce low allocation OTLP marshalers. If using autoconfigure, opt in
via `OTEL_JAVA_EXPERIMENTAL_EXPORTER_MEMORY_MODE=REUSABLE_DATA`.
* Low allocation OTLP logs marshaler
([#6429](https://github.com/open-telemetry/opentelemetry-java/pull/6429))
* Low allocation OTLP metrics marshaler
([#6422](https://github.com/open-telemetry/opentelemetry-java/pull/6422))
* Low allocation OTLP trace marshaler
([#6410](https://github.com/open-telemetry/opentelemetry-java/pull/6410))
* Add memory mode support to OTLP exporters
([#6430](https://github.com/open-telemetry/opentelemetry-java/pull/6430))
* Marshal span status description without allocation
([#6423](https://github.com/open-telemetry/opentelemetry-java/pull/6423))
* Add private constructors for stateless marshalers
([#6434](https://github.com/open-telemetry/opentelemetry-java/pull/6434))
* Mark opentelemetry-exporter-sender-jdk stable
([#6357](https://github.com/open-telemetry/opentelemetry-java/pull/6357))
* PrometheusHttpServer prevent concurrent reads when reusable memory mode
([#6371](https://github.com/open-telemetry/opentelemetry-java/pull/6371))
* Ignore TLS components (SSLContext, TrustManager, KeyManager) if plain HTTP protocol is used for
exporting
([#6329](https://github.com/open-telemetry/opentelemetry-java/pull/6329))
* Add is_remote_parent span flags to OTLP exported Spans and SpanLinks
([#6388](https://github.com/open-telemetry/opentelemetry-java/pull/6388))
* Add missing fields to OTLP metric exporters `toString()`
([#6402](https://github.com/open-telemetry/opentelemetry-java/pull/6402))
#### Extensions
* Rename otel.config.file to otel.experimental.config.file for autoconfigure
([#6396](https://github.com/open-telemetry/opentelemetry-java/pull/6396))
### OpenCensus Shim
* Fix opencensus shim spanBuilderWithRemoteParent behavior
([#6415](https://github.com/open-telemetry/opentelemetry-java/pull/6415))
### Tooling
* Add additional API incubator docs
([#6356](https://github.com/open-telemetry/opentelemetry-java/pull/6356))
* Run build on java 21
([#6370](https://github.com/open-telemetry/opentelemetry-java/pull/6370))
* Fix running tests with java 8 on macos
([#6411](https://github.com/open-telemetry/opentelemetry-java/pull/6411))
* Move away from deprecated gradle enterprise APIs
([#6363](https://github.com/open-telemetry/opentelemetry-java/pull/6363))
## Version 1.37.0 (2024-04-05)
**NOTICE:** This release contains a significant restructuring of the experimental event API and the API incubator artifact. Please read the notes in the `API -> Incubator` section carefully.
### API
@ -102,7 +847,7 @@
have stopped being published. Jaeger
has [native support for OTLP](https://opentelemetry.io/blog/2022/jaeger-native-otlp/), and users
should export to jaeger
using [OTLP](https://opentelemetry.io/docs/instrumentation/java/exporters/#otlp-dependencies)
using OTLP
instead.
### API
@ -186,7 +931,7 @@ instead.
and `opentelemetry-exporter-jaeger-thift`. Jaeger
has [native support for OTLP](https://opentelemetry.io/blog/2022/jaeger-native-otlp/), and users
should export to jaeger
using [OTLP](https://opentelemetry.io/docs/instrumentation/java/exporters/#otlp-dependencies)
using OTLP
instead.
### API
@ -623,7 +1368,7 @@ The log bridge API / SDK are now stable! Some important notes:
of `otel.logs.exporter` from `none` to `otlp`.
NOTE: reminder that
the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md)
the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/logs/bridge-api.md)
is _not_ meant for end users. Log appenders use the API to bridge logs from existing log
frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to
dictate how logs are processed and exported.
@ -691,7 +1436,7 @@ merged into `opentelemetry-exporter-otlp`, `opentelemetry-sdk-logs-testing` will
into `opentelemetry-sdk-testing`, `opentelemetry-sdk-extension-autoconfigure` will enable `otlp`
log exporter by default (i.e. `otel.logs.exporter=otlp`). For more details, see tracking
issue [#5340](https://github.com/open-telemetry/opentelemetry-java/issues/5340). NOTE: reminder that
the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md)
the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.21.0/specification/logs/bridge-api.md)
is _not_ meant for end users. Log appenders use the API to bridge logs from existing log
frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to
dictate how logs are processed and exported.
@ -1225,7 +1970,7 @@ This release is a notable release for metrics:
* Autoconfigure performs percent decoding on `otel.resource.attributes` values.
[(#4653)](https://github.com/open-telemetry/opentelemetry-java/issues/4653)
* Unify compression configuration for exporters including
[(#4775)](https://github.com/open-telemetry/opentelemetry-java/issues/4775):
[(#4775)](https://github.com/open-telemetry/opentelemetry-java/pull/4775):
* Fix handling of `none` in OTLP exporters.
* Add `JaegerGrpcSpanExporterBuilder#setCompression(String)`.
* Add `ZipkinSpanExporterBuilder#setCompression(String)`.
@ -1253,8 +1998,8 @@ log API component has been added for emitting events and for writing log appende
API is not a substitute for traditional log frameworks like Log4j, JUL, SLF4J, or Logback. While the
event portion of the API is intended for instrumentation authors and end users, the API for emitting
LogRecords is not.
See [LoggerProvider](./api/logs/src/main/java/io/opentelemetry/api/logs/LoggerProvider.java)
and [Logger](./api/logs/src/main/java/io/opentelemetry/api/logs/Logger.java) javadoc for more
See [LoggerProvider](./api/all/src/main/java/io/opentelemetry/api/logs/LoggerProvider.java)
and [Logger](./api/all/src/main/java/io/opentelemetry/api/logs/Logger.java) javadoc for more
details.
### General
@ -1540,7 +2285,7 @@ details.
stable `opentelemetry-sdk-extension-autoconfigure-spi`.
* Autoconfigure now supports multiple values for `otel.metrics.exporter`.
* Autoconfigure now
supports [general attribute limits](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#attribute-limits),
supports [general attribute limits](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#attribute-limits),
applicable to span attributes, span event attributes, span link attributes, and log attributes.
* Autoconfigure now supports an experimental option to disable the SDK.
If `otel.experimental.sdk.enabled=true`, `AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()`
@ -1790,7 +2535,7 @@ should not be many. Thanks for bearing with us on this.
### General
* Examples moved
to [opentelemetry-java-docs](https://github.com/open-telemetry/opentelemetry-java-docs)
to [opentelemetry-java-examples](https://github.com/open-telemetry/opentelemetry-java-examples)
### SDK
@ -3100,7 +3845,7 @@ See the `opentelemetry-extension-kotlin` module for details.
#### Breaking changes
- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the [YAML Model for Semantic Conventions](https://github.com/open-telemetry/opentelemetry-specification/tree/master/semantic_conventions).
- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the [YAML Model for Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/model#yaml-model-for-semantic-conventions).
- All API classes have been moved into the `io.opentelemetry.api.` prefix to support JPMS users.
- The API no longer uses the `grpc-context` as the context implementation. It now uses `io.opentelemetry.context.Context`. This is published in the `opentelemetry-context` artifact. Interactions with the context were mostly moved to static methods in the `Span` and `Baggage` interfaces.
- The Baggage API has been reworked to more closely match the specification. This includes the removal of the `BaggageManager`. Baggage is fully functional within the API, without needing to install an SDK.
@ -3131,7 +3876,7 @@ See the `opentelemetry-extension-kotlin` module for details.
#### Breaking changes
- `TraceConfig` configuration option names (environment variables and system properties) were renamed to match the OpenTelemetery Specification. For more information, see [TraceConfig](./QUICKSTART.md#TraceConfig).
- `TraceConfig` configuration option names (environment variables and system properties) were renamed to match the OpenTelemetery Specification.
- The Jaeger gRPC exporter was updated to match the OpenTelemetry Specification. The `message` log entry attribute has been renamed to `event` and a new `dropped attributes count` attribute was added. For more information, see the [Overview](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md).
- The `SpanData.getHasRemoteParent()` and `SpanData.getHasEnded()` methods were renamed to `hasRemoteParent()` and `hasEnded()`, respectively.
- The `IdsGenerator` interface has been renamed to `IdGenerator`, and all implementations and relevant factory methods were similarly renamed.

View File

@ -3,7 +3,7 @@
Welcome to OpenTelemetry Java repository!
Before you start - see OpenTelemetry general
[contributing](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md)
[contributing](https://github.com/open-telemetry/community/blob/main/guides/contributor/README.md)
requirements and recommendations.
If you want to add new features or change behavior, please make sure your changes follow the
@ -93,7 +93,7 @@ Other repositories in the OpenTelemetry Java ecosystem include:
contains instrumentation.
* [opentelemetry-java-contrib](https://github.com/open-telemetry/opentelemetry-java-contrib)
contains extensions, prototypes, and instrumentation, including vendor specific components.
* [opentelemetry-java-docs](https://github.com/open-telemetry/opentelemetry-java-docs) contains
* [opentelemetry-java-examples](https://github.com/open-telemetry/opentelemetry-java-examples) contains
working code snippets demonstrating various concepts.
## Style guideline
@ -146,6 +146,13 @@ uses [google-java-format](https://github.com/google/google-java-format) library:
synchronized (lock) { ... }
}
```
* Don't
use [gradle test fixtures](https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures) (
i.e. `java-test-fixtures` plugin) to reuse code for internal testing. The test fixtures plugin has
side effects where test dependencies are added to the `pom.xml` and publishes an
extra `*-test-fixtures.jar` artifact which is unnecessary for internal testing. Instead, create a
new `*:testing-internal` module and omit the `otel.java-conventions`. For example,
see [/exporters/otlp/testing-internal](./exporters/otlp/testing-internal).
If you notice any practice being applied in the project consistently that isn't listed here, please
consider a pull request to add it.
@ -183,6 +190,11 @@ in the guide for exceptions to the Javadoc requirement.
* Our javadoc is available via [
javadoc.io}(https://javadoc.io/doc/io.opentelemetry/opentelemetry-api)
### SDK Configuration Documentation
All changes to the SDK configuration options or autoconfigure module should be documented on
[opentelemetry.io](https://opentelemetry.io/docs/languages/java/configuration/).
### AutoValue
* Use [AutoValue](https://github.com/google/auto/tree/master/value), when possible, for any new
@ -245,13 +257,18 @@ Example usage could be as follows:
}
```
Please confirm whether the local opentelemetry-java version is consistent with the
opentelemetry-java version declared in the project that relies on opentelemetry-java.
If it is inconsistent, `dependencySubstitution` may not take effect.
See [the Gradle documentation](https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions)
for more information.
4. If you now build your project, it will use the included build to supply the opentelemetry-java
artifacts, ignoring any version declarations. Use the prefix `:DIRECTORY:` to refer to
tasks/projects within the included build, where DIRECTORY is the name of the directory in the
included build (only the part after the last `/`).
5. Here are some issues and solutions ([discussions/6551](https://github.com/open-telemetry/opentelemetry-java/discussions/6551))
you may encounter that may be helpful to you.
### Updating the OTLP protobufs

519
README.md
View File

@ -1,69 +1,25 @@
# OpenTelemetry Java
[![Continuous Build][ci-image]][ci-url]
[![Coverage Status][codecov-image]][codecov-url]
[![Maven Central][maven-image]][maven-url]
[![Coverage Status][codecov-image]][codecov-url]
[![FOSSA License Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java?ref=badge_shield&issueType=license)
[![FOSSA Security Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java.svg?type=shield&issueType=security)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java?ref=badge_shield&issueType=security)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/open-telemetry/opentelemetry-java/badge)](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-java)
[![Reproducible Builds](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/jvm-repo-rebuild/reproducible-central/master/content/io/opentelemetry/java/badge.json)](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/io/opentelemetry/java/README.md)
## Project Status
`opentelemetry-java` is the home of the Java implementation of the OpenTelemetry API for recording
telemetry, and SDK for managing telemetry recorded by the API.
See [Java status on OpenTelemetry.io][otel-java-status].
See [opentelemetry.io Java Documentation](https://opentelemetry.io/docs/languages/java/intro/) for:
## Getting Started
* An overview of the OpenTelemetry Java ecosystem and key repositories
* Detailed documentation on the components published from this repository
* Review of instrumentation ecosystem, including OpenTelemetry Java agent
* End-to-end working code examples
* And more
If you are looking for an all-in-one, easy-to-install **auto-instrumentation
javaagent**, see [opentelemetry-java-instrumentation][].
If you are looking for **examples** on how to use the OpenTelemetry API to
write your own **manual instrumentation**, or how to set up the OpenTelemetry
Java SDK, see [Manual instrumentation][]. Fully-functional examples
are available in [opentelemetry-java-docs][].
If you are looking for generated classes for
the [OpenTelemetry semantic conventions][opentelemetry-semantic-conventions],
see [semantic-conventions-java][opentelemetry-semantic-conventions-java].
For a general overview of OpenTelemetry, visit [opentelemetry.io][].
Would you like to get involved with the project? Read our [contributing guide](CONTRIBUTING.md). We welcome
contributions!
## Contacting us
We hold regular meetings. See details at [community page](https://github.com/open-telemetry/community#java-sdk).
We use [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-java/discussions)
for support or general questions. Feel free to drop us a line.
We are also present in the [`#otel-java`](https://cloud-native.slack.com/archives/C014L2KCTE3) channel in the [CNCF slack](https://slack.cncf.io/).
Please join us for more informal discussions.
To report a bug, or request a new feature,
please [open an issue](https://github.com/open-telemetry/opentelemetry-java/issues/new/choose).
## Overview
OpenTelemetry is the merging of OpenCensus and OpenTracing into a single project.
This project contains the following top level components:
* [OpenTelemetry API](api/):
* [stable apis](api/all) including `Tracer`, `Span`, `SpanContext`, `Meter`, and `Baggage`.
* [context api](context/) The OpenTelemetry Context implementation.
* [incubating apis](api/incubator) incubating APIs, including `Events`.
* [extensions](extensions/) define additional API extensions not part of the core API, including propagators.
* [sdk](sdk/) defines the implementation of the OpenTelemetry API.
* [exporters](exporters/) trace, metric, and log exporters for the SDK.
* [sdk-extensions](sdk-extensions/) defines additional SDK extensions, which are not part of the core SDK.
* [OpenTracing shim](opentracing-shim/) defines a bridge layer from OpenTracing to the OpenTelemetry API.
* [OpenCensus shim](opencensus-shim/) defines a bridge layer from OpenCensus to the OpenTelemetry API.
This project publishes a lot of artifacts, listed in [releases](#releases).
[`opentelemetry-bom`](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-bom) (BOM =
Bill of Materials) is provided to assist with synchronizing versions of
dependencies. [`opentelemetry-bom-alpha`](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-bom-alpha)
provides the same function for unstable artifacts. See [published releases](#published-releases) for
instructions on using the BOMs.
We would love to hear from the larger community: please provide feedback proactively.
> [!IMPORTANT]
> We are currently seeking additional contributors! See [help wanted](#help-wanted) for details.
## Requirements
@ -75,144 +31,134 @@ details.
reasons, [library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring)
must be enabled.
See [CONTRIBUTING.md](./CONTRIBUTING.md) for additional instructions for building this project for
development.
### Note about extensions
Both API and SDK extensions consist of various additional components which are excluded from the core artifacts
to keep them from growing too large.
We still aim to provide the same level of quality and guarantee for them as for the core components.
Please don't hesitate to use them if you find them useful.
## Project setup and contributing
Please refer to the [contribution guide](CONTRIBUTING.md) on how to set up for development and contribute!
## Published Releases
Published releases are available on maven central. We strongly recommend using our published BOM to keep all
dependency versions in sync.
### Maven
```xml
<project>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>1.36.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
</dependency>
</dependencies>
</project>
```
### Gradle
```groovy
dependencies {
implementation platform("io.opentelemetry:opentelemetry-bom:1.36.0")
implementation('io.opentelemetry:opentelemetry-api')
}
```
Note that if you want to use any artifacts that have not fully stabilized yet (such as the [prometheus exporter](https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/prometheus), then you will need to add an entry for the Alpha BOM as well, e.g.
```groovy
dependencies {
implementation platform("io.opentelemetry:opentelemetry-bom:1.36.0")
implementation platform('io.opentelemetry:opentelemetry-bom-alpha:1.36.0-alpha')
implementation('io.opentelemetry:opentelemetry-api')
implementation('io.opentelemetry:opentelemetry-exporter-prometheus')
implementation('io.opentelemetry:opentelemetry-sdk-extension-autoconfigure')
}
```
## Snapshots
Snapshots based out the `main` branch are available for `opentelemetry-api`, `opentelemetry-sdk` and the rest of the artifacts.
We strongly recommend using our published BOM to keep all dependency versions in sync.
### Maven
```xml
<project>
<repositories>
<repository>
<id>oss.sonatype.org-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>1.37.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
</dependency>
</dependencies>
</project>
```
### Gradle
```groovy
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
implementation platform("io.opentelemetry:opentelemetry-bom:1.37.0-SNAPSHOT")
implementation('io.opentelemetry:opentelemetry-api')
}
```
Libraries will usually only need `opentelemetry-api`, while applications
will want to use the `opentelemetry-sdk` module which contains our standard implementation
of the APIs.
## Gradle composite builds
For opentelemetry-java developers that need to test the latest source code with another
project, composite builds can be used as an alternative to `publishToMavenLocal`. This
requires some setup which is explained [here](CONTRIBUTING.md#composing-builds).
See [contributing](#contributing) for details on building this project locally.
## Releases
See the [VERSIONING.md](VERSIONING.md) document for our policies for releases and compatibility
guarantees.
Releases are published to maven central. We
publish [minor releases monthly](RELEASING.md#release-cadence)
and [patch releases as needed](RELEASING.md#preparing-a-new-patch-release).
Check out information about the [latest release](https://github.com/open-telemetry/opentelemetry-java/releases).
See [releases](https://github.com/open-telemetry/opentelemetry-java/releases) for a listing of
released versions and notes (see also [changelog](CHANGELOG.md)).
See the project [milestones](https://github.com/open-telemetry/opentelemetry-java/milestones)
for details on upcoming releases. The dates and features described in issues
and milestones are estimates, and subject to change.
## Artifacts
The following tables describe the artifacts published by this project. To take a dependency, follow
the instructions in [Published Released](#published-releases) to include the BOM, and specify the
dependency as follows, replacing `{{artifact-id}}` with the value from the "Artifact ID" column:
The artifacts published by this repository are summarized below in tables, organized in collapsible
sections by topic.
As discussed in [compatibility](#compatibility), artifact versions must be kept in sync, for which
we strongly recommend [using one of our BOMs][dependencies-and-boms].
<details>
<summary>Bill of Materials (BOMs)</summary>
A bill of materials (or BOM) helps sync dependency versions of related artifacts.
| Component | Description | Artifact ID | Version | Javadoc |
|----------------------------------------------|----------------------------------------|---------------------------|-------------------------------------------------------------|---------|
| [Bill of Materials (BOM)](./bom) | Bill of materials for stable artifacts | `opentelemetry-bom` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | N/A |
| [Alpha Bill of Materials (BOM)](./bom-alpha) | Bill of materials for alpha artifacts | `opentelemetry-bom-alpha` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | N/A |
</details>
<details open>
<summary>API</summary>
The OpenTelemetry API for recording telemetry.
| Component | Description | Artifact ID | Version | Javadoc |
|-----------------------------------|--------------------------------------------------------------------------------------|-------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [API](./api/all) | OpenTelemetry API, including metrics, traces, baggage, context | `opentelemetry-api` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api) |
| [API Incubator](./api/incubator) | API incubator, including pass through propagator, and extended tracer, and Event API | `opentelemetry-api-incubator` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api-incubator.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-incubator) |
| [Context API](./context) | OpenTelemetry context API | `opentelemetry-context` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-context.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-context) |
| [Common](./common) | Common utility methods used across API components | `opentelemetry-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-common) |
</details>
<details>
<summary>API Extensions</summary>
Extensions to the OpenTelemetry API.
| Component | Description | Artifact ID | Version | Javadoc |
|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Kotlin Extension](./extensions/kotlin) | Context extension for coroutines | `opentelemetry-extension-kotlin` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-extension-kotlin.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-kotlin) |
| [Trace Propagators Extension](./extensions/trace-propagators) | Trace propagators, including B3, Jaeger, OT Trace | `opentelemetry-extension-trace-propagators` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-extension-trace-propagators.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-trace-propagators) |
</details>
<details open>
<summary>SDK</summary>
The OpenTelemetry SDK for managing telemetry producing by the API.
| Component | Description | Artifact ID | Version | Javadoc |
|------------------------------|--------------------------------------------------------|-----------------------------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SDK](./sdk/all) | OpenTelemetry SDK, including metrics, traces, and logs | `opentelemetry-sdk` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk) |
| [Metrics SDK](./sdk/metrics) | OpenTelemetry metrics SDK | `opentelemetry-sdk-metrics` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-metrics.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-metrics) |
| [Trace SDK](./sdk/trace) | OpenTelemetry trace SDK | `opentelemetry-sdk-trace` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-trace.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-trace) |
| [Log SDK](./sdk/logs) | OpenTelemetry log SDK | `opentelemetry-sdk-logs` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-logs.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-logs) |
| [SDK Common](./sdk/common) | Shared SDK components | `opentelemetry-sdk-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-common) |
| [SDK Testing](./sdk/testing) | Components for testing OpenTelemetry instrumentation | `opentelemetry-sdk-testing` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-testing.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-testing) |
</details>
<details>
<summary>SDK Exporters</summary>
SDK exporters for shipping traces, metrics, and logs out of process.
| Component | Description | Artifact ID | Version | Javadoc |
|-----------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [OTLP Exporters](./exporters/otlp/all) | OTLP gRPC & HTTP exporters, including traces, metrics, and logs | `opentelemetry-exporter-otlp` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp) |
| [OTLP Logging Exporters](./exporters/logging-otlp) | Logging exporters in OTLP JSON encoding, including traces, metrics, and logs | `opentelemetry-exporter-logging-otlp` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-logging-otlp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging-otlp) |
| [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp-common) |
| [Logging Exporter](./exporters/logging) | Logging exporters, including metrics, traces, and logs | `opentelemetry-exporter-logging` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-logging.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging) |
| [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-zipkin.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-zipkin) |
| [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-prometheus.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-prometheus) |
| [Exporter Common](./exporters/common) | Shared exporter components (internal) | `opentelemetry-exporter-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-common) |
| [OkHttp Sender](./exporters/sender/okhttp) | OkHttp implementation of HttpSender (internal) | `opentelemetry-exporter-sender-okhttp` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-okhttp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-okhttp) |
| [JDK Sender](./exporters/sender/jdk) | Java 11+ native HttpClient implementation of HttpSender (internal) | `opentelemetry-exporter-sender-jdk` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-jdk.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-jdk) | |
| [gRPC ManagedChannel Sender](./exporters/sender/grpc-managed-channel) | gRPC ManagedChannel implementation of GrpcSender (internal) | `opentelemetry-exporter-sender-grpc-managed-channel` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel) | |
</details>
<details>
<summary>SDK Extensions</summary>
Extensions to the OpenTelemetry SDK.
| Component | Description | Artifact ID | Version | Javadoc |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SDK Autoconfigure](./sdk-extensions/autoconfigure) | Autoconfigure OpenTelemetry SDK from env vars, system properties, and SPI | `opentelemetry-sdk-extension-autoconfigure` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure) |
| [SDK Autoconfigure SPI](./sdk-extensions/autoconfigure-spi) | Service Provider Interface (SPI) definitions for autoconfigure | `opentelemetry-sdk-extension-autoconfigure-spi` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi) |
| [SDK Jaeger Remote Sampler Extension](./sdk-extensions/jaeger-remote-sampler) | Sampler which obtains sampling configuration from remote Jaeger server | `opentelemetry-sdk-extension-jaeger-remote-sampler` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-jaeger-remote-sampler.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-jaeger-remote-sampler) |
| [SDK Incubator](./sdk-extensions/incubator) | SDK incubator, including YAML based view configuration, LeakDetectingSpanProcessor | `opentelemetry-sdk-extension-incubator` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-incubator.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-incubator) |
</details>
<details>
<summary>Shims</summary>
Shims for bridging data from one observability library to another.
| Component | Description | Artifact ID | Version | Javadoc |
|----------------------------------------|--------------------------------------------------------------|----------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [OpenCensus Shim](./opencensus-shim) | Bridge opencensus metrics into the OpenTelemetry metrics SDK | `opentelemetry-opencensus-shim` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-opencensus-shim.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opencensus-shim) |
| [OpenTracing Shim](./opentracing-shim) | Bridge opentracing spans into the OpenTelemetry trace API | `opentelemetry-opentracing-shim` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-opentracing-shim.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opentracing-shim) |
</details>
## Dependencies
To take a dependency, [include a BOM][dependencies-and-boms] and specify the dependency as follows,
replacing `{{artifact-id}}` with the value from the "Artifact ID" column
from [artifacts](#artifacts):
<details open>
<summary>Gradle</summary>
```groovy
implementation('io.opentelemetry:{{artifact-id}}')
```
</details>
<details>
<summary>Maven</summary>
```xml
<dependency>
@ -220,125 +166,142 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti
<artifactId>{{artifact-id}}</artifactId>
</dependency>
```
</details>
### Snapshots
Snapshots of the `main` branch are available as follows:
<details open>
<summary>Gradle</summary>
```groovy
implementation('io.opentelemetry:{{artifact-id}}')
repositories {
maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
}
dependencies {
implementation platform("io.opentelemetry:opentelemetry-bom:1.53.0-SNAPSHOT")
implementation('io.opentelemetry:opentelemetry-api')
}
```
</details>
### Bill of Material
<details>
<summary>Maven</summary>
| Component | Description | Artifact ID | Version | Javadoc |
|----------------------------------------------|----------------------------------------|---------------------------|-------------------------------------------------------------|---------|
| [Bill of Materials (BOM)](./bom) | Bill of materials for stable artifacts | `opentelemetry-bom` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | N/A |
| [Alpha Bill of Materials (BOM)](./bom-alpha) | Bill of materials for alpha artifacts | `opentelemetry-bom-alpha` | <!--VERSION_UNSTABLE-->1.36.0-alpha<!--/VERSION_UNSTABLE--> | N/A |
```xml
<project>
<repositories>
<repository>
<id>sonatype-snapshot-repository</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>1.53.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
</dependency>
</dependencies>
</project>
```
</details>
### API
## Compatibility
Artifacts from this repository follow semantic versioning.
| Component | Description | Artifact ID | Version | Javadoc |
|-----------------------------------|--------------------------------------------------------------------------------------|-------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [API](./api/all) | OpenTelemetry API, including metrics, traces, baggage, context | `opentelemetry-api` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api) |
| [API Incubator](./api/incubator) | API incubator, including pass through propagator, and extended tracer, and Event API | `opentelemetry-api-incubator` | TODO: add after first publish | TODO: add after first publish |
| [Context API](./context) | OpenTelemetry context API | `opentelemetry-context` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-context.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-context) |
Stable artifacts (i.e. artifacts without `-alpha` version suffix) come with strong backwards
compatibility guarantees for public APIs.
### API Extensions
Artifacts may depend on other artifacts from this repository, and may depend on internal APIs (i.e.
non-public APIs) which are subject to change across minor versions. Therefore, it's critical to keep
artifact versions in sync in order to avoid possible runtime exceptions. We strongly
recommend [using one of our BOMs][dependencies-and-boms] to assist in keeping artifacts in sync.
| Component | Description | Artifact ID | Version | Javadoc |
|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Kotlin Extension](./extensions/kotlin) | Context extension for coroutines | `opentelemetry-extension-kotlin` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-extension-kotlin.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-kotlin) |
| [Trace Propagators Extension](./extensions/trace-propagators) | Trace propagators, including B3, Jaeger, OT Trace | `opentelemetry-extension-trace-propagators` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-extension-trace-propagators.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-trace-propagators) |
See the [VERSIONING.md](VERSIONING.md) for complete details on compatibility policy.
### SDK
## Contacting us
| Component | Description | Artifact ID | Version | Javadoc |
|------------------------------|--------------------------------------------------------|-----------------------------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SDK](./sdk/all) | OpenTelemetry SDK, including metrics, traces, and logs | `opentelemetry-sdk` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk) |
| [Metrics SDK](./sdk/metrics) | OpenTelemetry metrics SDK | `opentelemetry-sdk-metrics` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-metrics.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-metrics) |
| [Trace SDK](./sdk/trace) | OpenTelemetry trace SDK | `opentelemetry-sdk-trace` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-trace.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-trace) |
| [Log SDK](./sdk/logs) | OpenTelemetry log SDK | `opentelemetry-sdk-logs` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-logs.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-logs) |
| [SDK Common](./sdk/common) | Shared SDK components | `opentelemetry-sdk-common` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-common) |
| [SDK Testing](./sdk/testing) | Components for testing OpenTelemetry instrumentation | `opentelemetry-sdk-testing` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-testing.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-testing) |
We hold regular meetings. See details at [community page](https://github.com/open-telemetry/community#java-sdk).
### SDK Exporters
To report a bug, or request a new feature,
please [open an issue](https://github.com/open-telemetry/opentelemetry-java/issues/new/choose).
| Component | Description | Artifact ID | Version | Javadoc |
|-----------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [OTLP Exporters](./exporters/otlp/all) | OTLP gRPC & HTTP exporters, including traces, metrics, and logs | `opentelemetry-exporter-otlp` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp) |
| [OTLP Logging Exporters](./exporters/logging-otlp) | Logging exporters in OTLP JSON encoding, including traces, metrics, and logs | `opentelemetry-exporter-logging-otlp` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-logging-otlp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging-otlp) |
| [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-otlp-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp-common) |
| [Logging Exporter](./exporters/logging) | Logging exporters, including metrics, traces, and logs | `opentelemetry-exporter-logging` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-logging.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging) |
| [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-zipkin.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-zipkin) |
| [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | <!--VERSION_UNSTABLE-->1.36.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-prometheus.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-prometheus) |
| [Exporter Common](./exporters/common) | Shared exporter components (internal) | `opentelemetry-exporter-common` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-common.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-common) |
| [OkHttp Sender](./exporters/sender/okhttp) | OkHttp implementation of HttpSender (internal) | `opentelemetry-exporter-sender-okhttp` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-okhttp.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-okhttp) |
| [JDK Sender](./exporters/sender/okhttp) | Java 11+ native HttpClient implementation of HttpSender (internal) | `opentelemetry-exporter-sender-jdk` | <!--VERSION_UNSTABLE-->1.36.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-jdk.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-jdk) | |
| [gRPC ManagedChannel Sender](./exporters/sender/grpc-managed-channel) | gRPC ManagedChannel implementation of GrpcSender (internal) | `opentelemetry-exporter-sender-grpc-managed-channel` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel) | |
We use [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-java/discussions)
for support or general questions. Feel free to drop us a line.
### SDK Extensions
| Component | Description | Artifact ID | Version | Javadoc |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SDK Autoconfigure](./sdk-extensions/autoconfigure) | Autoconfigure OpenTelemetry SDK from env vars, system properties, and SPI | `opentelemetry-sdk-extension-autoconfigure` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure) |
| [SDK Autoconfigure SPI](./sdk-extensions/autoconfigure-spi) | Service Provider Interface (SPI) definitions for autoconfigure | `opentelemetry-sdk-extension-autoconfigure-spi` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi) |
| [SDK Jaeger Remote Sampler Extension](./sdk-extensions/jaeger-remote-sampler) | Sampler which obtains sampling configuration from remote Jaeger server | `opentelemetry-sdk-extension-jaeger-remote-sampler` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-jaeger-remote-sampler.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-jaeger-remote-sampler) |
| [SDK Incubator](./sdk-extensions/incubator) | SDK incubator, including YAML based view configuration, LeakDetectingSpanProcessor | `opentelemetry-sdk-extension-incubator` | <!--VERSION_UNSTABLE-->1.36.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-sdk-extension-incubator.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-incubator) |
### Shims
| Component | Description | Artifact ID | Version | Javadoc |
|----------------------------------------|--------------------------------------------------------------|----------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [OpenCensus Shim](./opencensus-shim) | Bridge opencensus metrics into the OpenTelemetry metrics SDK | `opentelemetry-opencensus-shim` | <!--VERSION_UNSTABLE-->1.36.0-alpha<!--/VERSION_UNSTABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-opencensus-shim.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opencensus-shim) |
| [OpenTracing Shim](./opentracing-shim) | Bridge opentracing spans into the OpenTelemetry trace API | `opentelemetry-opentracing-shim` | <!--VERSION_STABLE-->1.36.0<!--/VERSION_STABLE--> | [![Javadocs](https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-opentracing-shim.svg)](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opentracing-shim) |
We are also present in the [`#otel-java`](https://cloud-native.slack.com/archives/C014L2KCTE3) channel in the [CNCF slack](https://slack.cncf.io/).
Please join us for more informal discussions.
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
See [CONTRIBUTING.md](CONTRIBUTING.md) for:
Triagers:
* Details on building locally
* Project scope
* Keys to successful PRs
* Guide to using gradle composite builds
- [Gregor Zeitlinger](https://github.com/zeitlinger), Grafana Labs
*Find more about the triager role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#triager).*
Approvers ([@open-telemetry/java-approvers](https://github.com/orgs/open-telemetry/teams/java-approvers)):
- [Jason Plumb](https://github.com/breedx-splk), Splunk
- [Josh Suereth](https://github.com/jsuereth), Google
- [Trask Stalnaker](https://github.com/trask), Microsoft
*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*
Maintainers ([@open-telemetry/java-maintainers](https://github.com/orgs/open-telemetry/teams/java-maintainers)):
### Maintainers
- [Jack Berg](https://github.com/jack-berg), New Relic
- [John Watson](https://github.com/jkwatson), Verta.ai
Emeritus:
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
### Approvers
- [Jason Plumb](https://github.com/breedx-splk), Splunk
- [Josh Suereth](https://github.com/jsuereth), Google
- [Lauri Tulmin](https://github.com/laurit), Splunk
- [Trask Stalnaker](https://github.com/trask), Microsoft
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
### Triagers
- [Gregor Zeitlinger](https://github.com/zeitlinger), Grafana Labs
For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
### Emeritus
- Maintainer [Bogdan Drutu](https://github.com/BogdanDrutu)
- Maintainer [Carlos Alberto](https://github.com/carlosalberto)
- Approver [Mateusz Rzeszutek](https://github.com/mateuszrzeszutek)
*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
### Thanks to all the people who have contributed
### Help wanted
We are currently resource constrained and are actively seeking new contributors interested in working towards [approver](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver) / [maintainer](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer) roles. In addition to the documentation for approver / maintainer roles and the [contributing](./CONTRIBUTING.md) guide, here are some additional notes on engaging:
- [Pull request](https://github.com/open-telemetry/opentelemetry-java/pulls) reviews are equally or more helpful than code contributions. Comments and approvals are valuable with or without a formal project role. They're also a great forcing function to explore a fairly complex codebase.
- Attending the [Java: SDK + Automatic Instrumentation](https://github.com/open-telemetry/community?tab=readme-ov-file#implementation-sigs) Special Interest Group (SIG) is a great way to get to know community members and learn about project priorities.
- Issues labeled [help wanted](https://github.com/open-telemetry/opentelemetry-java/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) are project priorities. Code contributions (or pull request reviews when a PR is linked) for these issues are particularly important.
- Triaging / responding to new issues and discussions is a great way to engage with the project.
### Thanks to all of our contributors!
<a href="https://github.com/open-telemetry/opentelemetry-java/graphs/contributors">
<img src="https://contrib.rocks/image?repo=open-telemetry/opentelemetry-java" />
<img alt="Repo contributors" src="https://contrib.rocks/image?repo=open-telemetry/opentelemetry-java" />
</a>
Made with [contrib.rocks](https://contrib.rocks).
[ci-image]: https://github.com/open-telemetry/opentelemetry-java/workflows/Build/badge.svg
[ci-url]: https://github.com/open-telemetry/opentelemetry-java/actions?query=workflow%3ABuild+branch%3Amain
[codecov-image]: https://codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/graph/badge.svg
[codecov-url]: https://app.codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/
[Manual instrumentation]: https://opentelemetry.io/docs/java/manual_instrumentation/
[maven-image]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry/opentelemetry-api/badge.svg
[maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry/opentelemetry-api
[opentelemetry-java-instrumentation]: https://github.com/open-telemetry/opentelemetry-java-instrumentation
[opentelemetry-java-docs]: https://github.com/open-telemetry/opentelemetry-java-docs
[opentelemetry-semantic-conventions]: https://opentelemetry.io/docs/specs/semconv/
[opentelemetry-semantic-conventions-java]: https://github.com/open-telemetry/semantic-conventions-java
[opentelemetry.io]: https://opentelemetry.io
[otel-java-status]: https://opentelemetry.io/docs/instrumentation/java/#status-and-releases
[dependencies-and-boms]: https://opentelemetry.io/docs/languages/java/intro/#dependencies-and-boms
[maven-image]: https://maven-badges.sml.io/maven-central/io.opentelemetry/opentelemetry-api/badge.svg
[maven-url]: https://maven-badges.sml.io/maven-central/io.opentelemetry/opentelemetry-api

View File

@ -57,23 +57,16 @@ and deadlocks.
* Review and merge the pull request that it creates for updating the change log in main
(note that if this is not a patch release then the change log on main may already be up-to-date,
in which case no pull request will be created).
* Once the release artifacts become available on Maven Central, the system will automatically
generate a new pull request titled `Update apidiff baseline and documentation versions to
released version $VERSION`. This pull request will contain updates to both the API diff baseline
and version references in the documentation files (README.md). Please review and merge this
automated pull request.
* The [website](https://github.com/open-telemetry/opentelemetry.io) contains automation to update
to the newly released version. Review and approve the pull request when available.
## Update release versions in documentations
After releasing is done, you need to first update the docs. This needs to happen after artifacts have propagated
to Maven Central so should probably be done an hour or two after the release workflow finishes.
```
./gradlew updateVersionInDocs -Prelease.version=x.y.z
./gradlew japicmp -PapiBaseVersion=a.b.c -PapiNewVersion=x.y.z
./gradlew --refresh-dependencies japicmp
```
Where `x.y.z` is the version just released and `a.b.c` is the previous version.
Create a PR against the main branch with the changes.
* The [website](https://opentelemetry.io/docs/languages/java/configuration/#zero-code-sdk-autoconfigure)
contains documentation on autoconfiguration properties. If the release has updated or modified any
properties, open and merge a pull request to update the documentation.
## Credentials

View File

@ -18,7 +18,7 @@ changes are:
reordering parameters, adding a method to an interface or abstract class without adding a default
implementation.
- ABI changes that could require code using the artifact to be recompiled, but not changed, e.g.,
- [ABI](https://wikipedia.org/wiki/Application_binary_interface) changes that could require code using the artifact to be recompiled, but not changed, e.g.,
changing the return type of a method from `void` to non-`void`, changing a `class` to an `interface`.
The [JLS](https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html) has more information on
what constitutes compatible changes.
@ -72,8 +72,8 @@ respect to semantic versioning.
| Language | Minimum Version | Applicability | Semconv Notes |
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Java | 8+ | All artifacts, unless otherwise noted | Changing requires major version bump. |
| Android | 21+ (NOTE: [desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) is required. We stay up to date with the latest version of [desugar_jdk_libs](https://github.com/google/desugar_jdk_libs).) | Artifacts using `otel.animalsniffer-conventions` plugin | Kept in sync with minimum requirements for [Google Play services](https://developers.google.com/android/guides/setup). Subject to change in minor version. |
| Kotlin | 1.6+ | Only applies to `opentelemetry-extension-kotlin` | Kept in sync with [minimum non-deprecated](https://kotlinlang.org/docs/gradle-compiler-options.html#attributes-common-to-jvm-and-js) version. Subject to change in minor versions. |
| Android | 23+ (NOTE: [desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) is required. We stay up to date with the latest version of [desugar_jdk_libs](https://github.com/google/desugar_jdk_libs).) | Artifacts using `otel.animalsniffer-conventions` plugin | Kept in sync with minimum requirements for [Google Play services](https://developers.google.com/android/guides/setup). Subject to change in minor version. |
| Kotlin | 1.8+ | Only applies to `opentelemetry-extension-kotlin` | Kept in sync with [minimum non-deprecated](https://kotlinlang.org/docs/gradle-compiler-options.html#attributes-common-to-jvm-and-js) version. Subject to change in minor versions. |
## API vs SDK

View File

@ -28,7 +28,7 @@ class SdkDesignTest {
* Ensures that all SDK methods that: - are defined in classes that extend or implement API model
* and are public (to exclude protected builders) - are public (avoids issues with protected
* methods returning classes unavailable to test's CL) - override or implement parent method
* return only API, Context or generic Java type.
* return only API, Context, Common, or generic Java type.
*/
@Test
void sdkImplementationOfApiClassesShouldReturnApiTypeOnly() {
@ -45,7 +45,11 @@ class SdkDesignTest {
.and(implementOrOverride())
.should()
.haveRawReturnType(
inPackage("io.opentelemetry.api..", "io.opentelemetry.context..", "java.."))
inPackage(
"io.opentelemetry.api..",
"io.opentelemetry.context..",
"io.opentelemetry.common..",
"java.."))
.orShould()
.haveRawReturnType("void");

View File

@ -27,7 +27,7 @@ configurations.add(signatureJarClasspath)
configurations.add(generatedSignature)
dependencies {
signature("com.toasttab.android:gummy-bears-api-21:0.8.0@signature")
signature("com.toasttab.android:gummy-bears-api-23:0.12.0@signature")
signatureJar("com.android.tools:desugar_jdk_libs")
}

View File

@ -15,6 +15,8 @@ dependencies {
annotationProcessor("com.google.auto.value:auto-value")
testImplementation(project(":api:testing-internal"))
testImplementation("edu.berkeley.cs.jqf:jqf-fuzz")
testImplementation("com.google.guava:guava-testlib")
}

View File

@ -17,6 +17,7 @@ import io.opentelemetry.api.trace.TracerProvider;
import io.opentelemetry.context.propagation.ContextPropagators;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.function.Supplier;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
@ -116,6 +117,21 @@ public final class GlobalOpenTelemetry {
}
}
/**
* Sets the {@link OpenTelemetry} that should be the global instance.
*
* <p>This method calls the given {@code supplier} and calls {@link #set(OpenTelemetry)}, all
* while holding the {@link GlobalOpenTelemetry} mutex.
*
* @since 1.52.0
*/
public static void set(Supplier<OpenTelemetry> supplier) {
synchronized (mutex) {
OpenTelemetry openTelemetry = supplier.get();
set(openTelemetry);
}
}
/** Returns the globally registered {@link TracerProvider}. */
public static TracerProvider getTracerProvider() {
return get().getTracerProvider();

View File

@ -99,4 +99,23 @@ public interface Baggage extends ImplicitContextKeyed {
* be set to not use an implicit parent, so any parent assignment must be done manually.
*/
BaggageBuilder toBuilder();
/**
* Returns the {@code BaggageEntry} associated with the given key.
*
* @param entryKey entry key to return the {@code BaggageEntry} for, or {@code null} if no {@code
* Entry} with the given {@code entryKey} is in this {@code Baggage}.
* @since 1.43.0
*/
@Nullable
default BaggageEntry getEntry(String entryKey) {
BaggageEntry[] result = new BaggageEntry[] {null};
forEach(
(key, entry) -> {
if (entryKey.equals(key)) {
result[0] = entry;
}
});
return result[0];
}
}

View File

@ -37,6 +37,13 @@ final class ImmutableBaggage extends ImmutableKeyValuePairs<String, BaggageEntry
return entry != null ? entry.getValue() : null;
}
// Overrides the default implementation to provide a more performant implementation.
@Nullable
@Override
public BaggageEntry getEntry(String entryKey) {
return get(entryKey);
}
@Override
public BaggageBuilder toBuilder() {
return new Builder(new ArrayList<>(data()));

View File

@ -13,7 +13,6 @@
* <p>Note that entries are independent of the tracing data that is propagated in the {@link
* io.opentelemetry.context.Context}, such as trace ID.
*/
// TODO: Add code examples.
@ParametersAreNonnullByDefault
package io.opentelemetry.api.baggage;

View File

@ -12,11 +12,11 @@ import javax.annotation.Nullable;
/**
* Implements single-pass Baggage parsing in accordance with https://w3c.github.io/baggage/ Key /
* value are restricted in accordance with https://www.ietf.org/rfc/rfc2616.txt
* value are restricted in accordance with https://www.ietf.org/rfc/rfc2616.txt.
*
* <p>Note: following aspects are not specified in RFC: - some invalid elements (key or value) -
* parser will include valid ones, disregard invalid - empty "value" is regarded as invalid - meta -
* anything besides element terminator (comma)
* anything besides element terminator (comma).
*/
class Parser {
@ -37,7 +37,7 @@ class Parser {
private boolean skipToNext;
public Parser(String baggageHeader) {
Parser(String baggageHeader) {
this.baggageHeader = baggageHeader;
reset(0);
}

View File

@ -17,6 +17,7 @@ import io.opentelemetry.context.propagation.TextMapGetter;
import io.opentelemetry.context.propagation.TextMapPropagator;
import io.opentelemetry.context.propagation.TextMapSetter;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Nullable;
@ -95,21 +96,34 @@ public final class W3CBaggagePropagator implements TextMapPropagator {
return context;
}
String baggageHeader = getter.get(carrier, FIELD);
if (baggageHeader == null) {
return context;
}
if (baggageHeader.isEmpty()) {
return extractMulti(context, carrier, getter);
}
private static <C> Context extractMulti(
Context context, @Nullable C carrier, TextMapGetter<C> getter) {
Iterator<String> baggageHeaders = getter.getAll(carrier, FIELD);
if (baggageHeaders == null) {
return context;
}
boolean extracted = false;
BaggageBuilder baggageBuilder = Baggage.builder();
try {
extractEntries(baggageHeader, baggageBuilder);
} catch (RuntimeException e) {
return context;
while (baggageHeaders.hasNext()) {
String header = baggageHeaders.next();
if (header.isEmpty()) {
continue;
}
try {
extractEntries(header, baggageBuilder);
extracted = true;
} catch (RuntimeException expected) {
// invalid baggage header, continue
}
}
return context.with(baggageBuilder.build());
return extracted ? context.with(baggageBuilder.build()) : context;
}
private static void extractEntries(String baggageHeader, BaggageBuilder baggageBuilder) {
@ -127,7 +141,7 @@ public final class W3CBaggagePropagator implements TextMapPropagator {
* @return whether the name is valid.
*/
private static boolean isValidBaggageKey(String name) {
return name != null && !name.isEmpty() && StringUtils.isPrintableString(name);
return name != null && !name.trim().isEmpty() && StringUtils.isPrintableString(name);
}
/**

View File

@ -9,6 +9,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import javax.annotation.Nullable;
class ArrayBackedAttributesBuilder implements AttributesBuilder {
private final List<Object> data;
@ -37,7 +38,7 @@ class ArrayBackedAttributesBuilder implements AttributesBuilder {
}
@Override
public <T> AttributesBuilder put(AttributeKey<T> key, T value) {
public <T> AttributesBuilder put(AttributeKey<T> key, @Nullable T value) {
if (key == null || key.getKey().isEmpty() || value == null) {
return this;
}

View File

@ -26,6 +26,11 @@ public interface AttributeKey<T> {
/** Returns the type of attribute for this key. Useful for building switch statements. */
AttributeType getType();
// TODO (jack-berg): uncomment when extended attributes are promoted from incubator to API
// default ExtendedAttributeKey<T> asExtendedAttributeKey() {
// return InternalAttributeKeyImpl.toExtendedAttributeKey(this);
// }
/** Returns a new AttributeKey for String valued attributes. */
static AttributeKey<String> stringKey(String key) {
return InternalAttributeKeyImpl.create(key, AttributeType.STRING);

View File

@ -18,6 +18,7 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import javax.annotation.Nullable;
/** A builder of {@link Attributes} supporting an arbitrary number of key-value pairs. */
public interface AttributesBuilder {
@ -35,18 +36,22 @@ public interface AttributesBuilder {
// version.
<T> AttributesBuilder put(AttributeKey<Long> key, int value);
/** Puts a {@link AttributeKey} with associated value into this. */
<T> AttributesBuilder put(AttributeKey<T> key, T value);
/**
* Puts an {@link AttributeKey} with an associated value into this if the value is non-null.
* Providing a null value does not remove or unset previously set values.
*/
<T> AttributesBuilder put(AttributeKey<T> key, @Nullable T value);
/**
* Puts a String attribute into this.
* Puts a String attribute into this if the value is non-null. Providing a null value does not
* remove or unset previously set values.
*
* <p>Note: It is strongly recommended to use {@link #put(AttributeKey, Object)}, and pre-allocate
* your keys, if possible.
*
* @return this Builder
*/
default AttributesBuilder put(String key, String value) {
default AttributesBuilder put(String key, @Nullable String value) {
return put(stringKey(key), value);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.common;
/**
* Key-value pair of {@link String} key and {@link Value} value.
*
* @see Value#of(KeyValue...)
* @since 1.42.0
*/
public interface KeyValue {
/** Returns a {@link KeyValue} for the given {@code key} and {@code value}. */
static KeyValue of(String key, Value<?> value) {
return KeyValueImpl.create(key, value);
}
/** Returns the key. */
String getKey();
/** Returns the value. */
Value<?> getValue();
}

View File

@ -0,0 +1,18 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.common;
import com.google.auto.value.AutoValue;
@AutoValue
abstract class KeyValueImpl implements KeyValue {
KeyValueImpl() {}
static KeyValueImpl create(String key, Value<?> value) {
return new AutoValue_KeyValueImpl(key, value);
}
}

View File

@ -0,0 +1,75 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.common;
import static java.util.stream.Collectors.joining;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
final class KeyValueList implements Value<List<KeyValue>> {
private final List<KeyValue> value;
private KeyValueList(List<KeyValue> value) {
this.value = value;
}
static Value<List<KeyValue>> create(KeyValue... value) {
Objects.requireNonNull(value, "value must not be null");
List<KeyValue> list = new ArrayList<>(value.length);
list.addAll(Arrays.asList(value));
return new KeyValueList(Collections.unmodifiableList(list));
}
static Value<List<KeyValue>> createFromMap(Map<String, Value<?>> value) {
Objects.requireNonNull(value, "value must not be null");
KeyValue[] array =
value.entrySet().stream()
.map(entry -> KeyValue.of(entry.getKey(), entry.getValue()))
.toArray(KeyValue[]::new);
return create(array);
}
@Override
public ValueType getType() {
return ValueType.KEY_VALUE_LIST;
}
@Override
public List<KeyValue> getValue() {
return value;
}
@Override
public String asString() {
return value.stream()
.map(item -> item.getKey() + "=" + item.getValue().asString())
.collect(joining(", ", "[", "]"));
}
@Override
public String toString() {
return "KeyValueList{" + asString() + "}";
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
}
@Override
public int hashCode() {
return value.hashCode();
}
}

View File

@ -0,0 +1,118 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.common;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
/**
* Value mirrors the proto <a
* href="https://github.com/open-telemetry/opentelemetry-proto/blob/ac3242b03157295e4ee9e616af53b81517b06559/opentelemetry/proto/common/v1/common.proto#L28">AnyValue</a>
* message type, and is used to model any type.
*
* <p>It can be used to represent:
*
* <ul>
* <li>Primitive values via {@link #of(long)}, {@link #of(String)}, {@link #of(boolean)}, {@link
* #of(double)}.
* <li>String-keyed maps (i.e. associative arrays, dictionaries) via {@link #of(KeyValue...)},
* {@link #of(Map)}. Note, because map values are type {@link Value}, maps can be nested
* within other maps.
* <li>Arrays (heterogeneous or homogenous) via {@link #of(Value[])}. Note, because array values
* are type {@link Value}, arrays can contain primitives, complex types like maps or arrays,
* or any combination.
* <li>Raw bytes via {@link #of(byte[])}
* </ul>
*
* <p>Currently, Value is only used as an argument for {@link
* io.opentelemetry.api.logs.LogRecordBuilder#setBody(Value)}.
*
* @param <T> the type. See {@link #getValue()} for description of types.
* @since 1.42.0
*/
public interface Value<T> {
/** Returns an {@link Value} for the {@link String} value. */
static Value<String> of(String value) {
return ValueString.create(value);
}
/** Returns an {@link Value} for the {@code boolean} value. */
static Value<Boolean> of(boolean value) {
return ValueBoolean.create(value);
}
/** Returns an {@link Value} for the {@code long} value. */
static Value<Long> of(long value) {
return ValueLong.create(value);
}
/** Returns an {@link Value} for the {@code double} value. */
static Value<Double> of(double value) {
return ValueDouble.create(value);
}
/** Returns an {@link Value} for the {@code byte[]} value. */
static Value<ByteBuffer> of(byte[] value) {
return ValueBytes.create(value);
}
/** Returns an {@link Value} for the array of {@link Value} values. */
static Value<List<Value<?>>> of(Value<?>... value) {
return ValueArray.create(value);
}
/** Returns an {@link Value} for the list of {@link Value} values. */
static Value<List<Value<?>>> of(List<Value<?>> value) {
return ValueArray.create(value);
}
/**
* Returns an {@link Value} for the array of {@link KeyValue} values. {@link KeyValue#getKey()}
* values should not repeat - duplicates may be dropped.
*/
static Value<List<KeyValue>> of(KeyValue... value) {
return KeyValueList.create(value);
}
/** Returns an {@link Value} for the {@link Map} of key, {@link Value}. */
static Value<List<KeyValue>> of(Map<String, Value<?>> value) {
return KeyValueList.createFromMap(value);
}
/** Returns the type of this {@link Value}. Useful for building switch statements. */
ValueType getType();
/**
* Returns the value for this {@link Value}.
*
* <p>The return type varies by {@link #getType()} as described below:
*
* <ul>
* <li>{@link ValueType#STRING} returns {@link String}
* <li>{@link ValueType#BOOLEAN} returns {@code boolean}
* <li>{@link ValueType#LONG} returns {@code long}
* <li>{@link ValueType#DOUBLE} returns {@code double}
* <li>{@link ValueType#ARRAY} returns {@link List} of {@link Value}
* <li>{@link ValueType#KEY_VALUE_LIST} returns {@link List} of {@link KeyValue}
* <li>{@link ValueType#BYTES} returns read only {@link ByteBuffer}. See {@link
* ByteBuffer#asReadOnlyBuffer()}.
* </ul>
*/
T getValue();
/**
* Return a string encoding of this {@link Value}. This is intended to be a fallback serialized
* representation in case there is no suitable encoding that can utilize {@link #getType()} /
* {@link #getValue()} to serialize specific types.
*
* <p>WARNING: No guarantees are made about the encoding of this string response. It MAY change in
* a future minor release. If you need a reliable string encoding, write your own serializer.
*/
// TODO(jack-berg): Should this be a JSON encoding?
String asString();
}

View File

@ -0,0 +1,67 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.common;
import static java.util.stream.Collectors.joining;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
final class ValueArray implements Value<List<Value<?>>> {
private final List<Value<?>> value;
private ValueArray(List<Value<?>> value) {
this.value = value;
}
static Value<List<Value<?>>> create(Value<?>... value) {
Objects.requireNonNull(value, "value must not be null");
List<Value<?>> list = new ArrayList<>(value.length);
list.addAll(Arrays.asList(value));
return new ValueArray(Collections.unmodifiableList(list));
}
static Value<List<Value<?>>> create(List<Value<?>> value) {
return new ValueArray(Collections.unmodifiableList(value));
}
@Override
public ValueType getType() {
return ValueType.ARRAY;
}
@Override
public List<Value<?>> getValue() {
return value;
}
@Override
public String asString() {
return value.stream().map(Value::asString).collect(joining(", ", "[", "]"));
}
@Override
public String toString() {
return "ValueArray{" + asString() + "}";
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
}
@Override
public int hashCode() {
return value.hashCode();
}
}

View File

@ -3,25 +3,25 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.logs;
package io.opentelemetry.api.common;
import java.util.Objects;
final class AnyValueBoolean implements AnyValue<Boolean> {
final class ValueBoolean implements Value<Boolean> {
private final boolean value;
private AnyValueBoolean(boolean value) {
private ValueBoolean(boolean value) {
this.value = value;
}
static AnyValue<Boolean> create(boolean value) {
return new AnyValueBoolean(value);
static Value<Boolean> create(boolean value) {
return new ValueBoolean(value);
}
@Override
public AnyValueType getType() {
return AnyValueType.BOOLEAN;
public ValueType getType() {
return ValueType.BOOLEAN;
}
@Override
@ -36,7 +36,7 @@ final class AnyValueBoolean implements AnyValue<Boolean> {
@Override
public String toString() {
return "AnyValueBoolean{" + asString() + "}";
return "ValueBoolean{" + asString() + "}";
}
@Override
@ -44,7 +44,7 @@ final class AnyValueBoolean implements AnyValue<Boolean> {
if (this == o) {
return true;
}
return (o instanceof AnyValue) && Objects.equals(this.value, ((AnyValue<?>) o).getValue());
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
}
@Override

View File

@ -3,29 +3,29 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.logs;
package io.opentelemetry.api.common;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Base64;
import java.util.Objects;
final class AnyValueBytes implements AnyValue<ByteBuffer> {
final class ValueBytes implements Value<ByteBuffer> {
private final byte[] raw;
private AnyValueBytes(byte[] value) {
private ValueBytes(byte[] value) {
this.raw = value;
}
static AnyValue<ByteBuffer> create(byte[] value) {
static Value<ByteBuffer> create(byte[] value) {
Objects.requireNonNull(value, "value must not be null");
return new AnyValueBytes(Arrays.copyOf(value, value.length));
return new ValueBytes(Arrays.copyOf(value, value.length));
}
@Override
public AnyValueType getType() {
return AnyValueType.BYTES;
public ValueType getType() {
return ValueType.BYTES;
}
@Override
@ -40,7 +40,7 @@ final class AnyValueBytes implements AnyValue<ByteBuffer> {
@Override
public String toString() {
return "AnyValueBytes{" + asString() + "}";
return "ValueBytes{" + asString() + "}";
}
@Override
@ -48,7 +48,7 @@ final class AnyValueBytes implements AnyValue<ByteBuffer> {
if (this == o) {
return true;
}
return (o instanceof AnyValueBytes) && Arrays.equals(this.raw, ((AnyValueBytes) o).raw);
return (o instanceof ValueBytes) && Arrays.equals(this.raw, ((ValueBytes) o).raw);
}
@Override

View File

@ -3,25 +3,25 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.logs;
package io.opentelemetry.api.common;
import java.util.Objects;
final class AnyValueDouble implements AnyValue<Double> {
final class ValueDouble implements Value<Double> {
private final double value;
private AnyValueDouble(double value) {
private ValueDouble(double value) {
this.value = value;
}
static AnyValue<Double> create(double value) {
return new AnyValueDouble(value);
static Value<Double> create(double value) {
return new ValueDouble(value);
}
@Override
public AnyValueType getType() {
return AnyValueType.DOUBLE;
public ValueType getType() {
return ValueType.DOUBLE;
}
@Override
@ -36,7 +36,7 @@ final class AnyValueDouble implements AnyValue<Double> {
@Override
public String toString() {
return "AnyValueDouble{" + asString() + "}";
return "ValueDouble{" + asString() + "}";
}
@Override
@ -44,7 +44,7 @@ final class AnyValueDouble implements AnyValue<Double> {
if (this == o) {
return true;
}
return (o instanceof AnyValue) && Objects.equals(this.value, ((AnyValue<?>) o).getValue());
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
}
@Override

View File

@ -3,25 +3,25 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.logs;
package io.opentelemetry.api.common;
import java.util.Objects;
final class AnyValueLong implements AnyValue<Long> {
final class ValueLong implements Value<Long> {
private final long value;
private AnyValueLong(long value) {
private ValueLong(long value) {
this.value = value;
}
static AnyValue<Long> create(long value) {
return new AnyValueLong(value);
static Value<Long> create(long value) {
return new ValueLong(value);
}
@Override
public AnyValueType getType() {
return AnyValueType.LONG;
public ValueType getType() {
return ValueType.LONG;
}
@Override
@ -36,7 +36,7 @@ final class AnyValueLong implements AnyValue<Long> {
@Override
public String toString() {
return "AnyValueLong{" + asString() + "}";
return "ValueLong{" + asString() + "}";
}
@Override
@ -44,7 +44,7 @@ final class AnyValueLong implements AnyValue<Long> {
if (this == o) {
return true;
}
return (o instanceof AnyValue) && Objects.equals(this.value, ((AnyValue<?>) o).getValue());
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
}
@Override

View File

@ -3,26 +3,26 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.logs;
package io.opentelemetry.api.common;
import java.util.Objects;
final class AnyValueString implements AnyValue<String> {
final class ValueString implements Value<String> {
private final String value;
private AnyValueString(String value) {
private ValueString(String value) {
this.value = value;
}
static AnyValue<String> create(String value) {
static Value<String> create(String value) {
Objects.requireNonNull(value, "value must not be null");
return new AnyValueString(value);
return new ValueString(value);
}
@Override
public AnyValueType getType() {
return AnyValueType.STRING;
public ValueType getType() {
return ValueType.STRING;
}
@Override
@ -37,7 +37,7 @@ final class AnyValueString implements AnyValue<String> {
@Override
public String toString() {
return "AnyValueString{" + value + "}";
return "ValueString{" + value + "}";
}
@Override
@ -45,7 +45,7 @@ final class AnyValueString implements AnyValue<String> {
if (this == o) {
return true;
}
return (o instanceof AnyValue) && Objects.equals(this.value, ((AnyValue<?>) o).getValue());
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
}
@Override

View File

@ -3,14 +3,16 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.logs;
package io.opentelemetry.api.common;
/**
* AnyValue type options, mirroring <a
* href="https://github.com/open-telemetry/opentelemetry-proto/blob/ac3242b03157295e4ee9e616af53b81517b06559/opentelemetry/proto/common/v1/common.proto#L31">AnyValue#value
* options</a>.
*
* @since 1.42.0
*/
public enum AnyValueType {
public enum ValueType {
STRING,
BOOLEAN,
LONG,

View File

@ -5,8 +5,10 @@
package io.opentelemetry.api.internal;
import java.util.ConcurrentModificationException;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import javax.annotation.Nullable;
/**
@ -19,6 +21,17 @@ public final class ConfigUtil {
private ConfigUtil() {}
/**
* Returns a copy of system properties which is safe to iterate over.
*
* <p>In java 8 and android environments, iterating through system properties may trigger {@link
* ConcurrentModificationException}. This method ensures callers can iterate safely without risk
* of exception. See https://github.com/open-telemetry/opentelemetry-java/issues/6732 for details.
*/
public static Properties safeSystemProperties() {
return (Properties) System.getProperties().clone();
}
/**
* Return the system property or environment variable for the {@code key}.
*
@ -33,8 +46,9 @@ public final class ConfigUtil {
*/
public static String getString(String key, String defaultValue) {
String normalizedKey = normalizePropertyKey(key);
String systemProperty =
System.getProperties().entrySet().stream()
safeSystemProperties().entrySet().stream()
.filter(entry -> normalizedKey.equals(normalizePropertyKey(entry.getKey().toString())))
.map(entry -> entry.getValue().toString())
.findFirst()

View File

@ -274,4 +274,13 @@ public abstract class ImmutableKeyValuePairs<K, V> {
sb.append("}");
return sb.toString();
}
/**
* Return the backing data array for these attributes. This is only exposed for internal use by
* opentelemetry authors. The contents of the array MUST NOT be modified.
*/
@SuppressWarnings("AvoidObjectArrays")
public Object[] getData() {
return data;
}
}

View File

@ -0,0 +1,29 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.internal;
import java.lang.reflect.Method;
/**
* Incubating utilities.
*
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
* at any time.
*/
public class IncubatingUtil {
private IncubatingUtil() {}
@SuppressWarnings("unchecked")
public static <T> T incubatingApiIfAvailable(T stableApi, String incubatingClassName) {
try {
Class<?> incubatingClass = Class.forName(incubatingClassName);
Method getInstance = incubatingClass.getDeclaredMethod("getNoop");
return (T) getInstance.invoke(null);
} catch (Exception e) {
return stableApi;
}
}
}

View File

@ -0,0 +1,40 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.internal;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.ContextKey;
import java.util.Objects;
/**
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
* any time.
*/
public final class InstrumentationUtil {
private static final ContextKey<Boolean> SUPPRESS_INSTRUMENTATION_KEY =
ContextKey.named("suppress_instrumentation");
private InstrumentationUtil() {}
/**
* Adds a Context boolean key that will allow to identify HTTP calls coming from OTel exporters.
* The key later be checked by an automatic instrumentation to avoid tracing OTel exporter's
* calls.
*/
public static void suppressInstrumentation(Runnable runnable) {
Context.current().with(SUPPRESS_INSTRUMENTATION_KEY, true).wrap(runnable).run();
}
/**
* Checks if an automatic instrumentation should be suppressed with the provided Context.
*
* @return TRUE to suppress the automatic instrumentation, FALSE to continue with the
* instrumentation.
*/
public static boolean shouldSuppressInstrumentation(Context context) {
return Objects.equals(context.get(SUPPRESS_INSTRUMENTATION_KEY), true);
}
}

View File

@ -89,12 +89,17 @@ public final class OtelEncodingUtils {
/** Returns the {@code byte[]} decoded from the given hex {@link CharSequence}. */
public static byte[] bytesFromBase16(CharSequence value, int length) {
byte[] result = new byte[length / 2];
for (int i = 0; i < length; i += 2) {
result[i / 2] = byteFromBase16(value.charAt(i), value.charAt(i + 1));
}
bytesFromBase16(value, length, result);
return result;
}
/** Fills {@code bytes} with bytes decoded from the given hex {@link CharSequence}. */
public static void bytesFromBase16(CharSequence value, int length, byte[] bytes) {
for (int i = 0; i < length; i += 2) {
bytes[i / 2] = byteFromBase16(value.charAt(i), value.charAt(i + 1));
}
}
/** Fills {@code dest} with the hex encoding of {@code bytes}. */
public static void bytesToBase16(byte[] bytes, char[] dest, int length) {
for (int i = 0; i < length; i++) {

View File

@ -6,9 +6,11 @@
package io.opentelemetry.api.logs;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Value;
import io.opentelemetry.context.Context;
import java.time.Instant;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
class DefaultLogger implements Logger {
@ -71,7 +73,12 @@ class DefaultLogger implements Logger {
}
@Override
public <T> LogRecordBuilder setAttribute(AttributeKey<T> key, T value) {
public LogRecordBuilder setBody(Value<?> body) {
return this;
}
@Override
public <T> LogRecordBuilder setAttribute(AttributeKey<T> key, @Nullable T value) {
return this;
}

View File

@ -5,11 +5,18 @@
package io.opentelemetry.api.logs;
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
import static io.opentelemetry.api.common.AttributeKey.doubleKey;
import static io.opentelemetry.api.common.AttributeKey.longKey;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.common.Value;
import io.opentelemetry.context.Context;
import java.time.Instant;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
/**
* Used to construct and emit log records from a {@link Logger}.
@ -66,9 +73,23 @@ public interface LogRecordBuilder {
/** Set the severity text. */
LogRecordBuilder setSeverityText(String severityText);
/** Set the body string. */
/**
* Set the body string.
*
* <p>Shorthand for calling {@link #setBody(Value)} with {@link Value#of(String)}.
*/
LogRecordBuilder setBody(String body);
/**
* Set the body {@link Value}.
*
* @since 1.42.0
*/
default LogRecordBuilder setBody(Value<?> body) {
setBody(body.asString());
return this;
}
/**
* Sets attributes. If the {@link LogRecordBuilder} previously contained a mapping for any of the
* keys, the old values are replaced by the specified values.
@ -83,8 +104,111 @@ public interface LogRecordBuilder {
return this;
}
/** Sets an attribute. */
<T> LogRecordBuilder setAttribute(AttributeKey<T> key, T value);
/**
* Sets an attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained a
* mapping for the key, the old value is replaced by the specified value.
*
* <p>Note: Providing a null value is a no-op and will not remove previously set values.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
*/
<T> LogRecordBuilder setAttribute(AttributeKey<T> key, @Nullable T value);
/**
* Sets a String attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained
* a mapping for the key, the old value is replaced by the specified value.
*
* <p>Note: Providing a null value is a no-op and will not remove previously set values.
*
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
* pre-allocate your keys, if possible.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
* @since 1.48.0
*/
default LogRecordBuilder setAttribute(String key, @Nullable String value) {
return setAttribute(stringKey(key), value);
}
/**
* Sets a Long attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained a
* mapping for the key, the old value is replaced by the specified value.
*
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
* pre-allocate your keys, if possible.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
* @since 1.48.0
*/
default LogRecordBuilder setAttribute(String key, long value) {
return setAttribute(longKey(key), value);
}
/**
* Sets a Double attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained
* a mapping for the key, the old value is replaced by the specified value.
*
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
* pre-allocate your keys, if possible.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
* @since 1.48.0
*/
default LogRecordBuilder setAttribute(String key, double value) {
return setAttribute(doubleKey(key), value);
}
/**
* Sets a Boolean attribute on the {@code LogRecord}. If the {@code LogRecord} previously
* contained a mapping for the key, the old value is replaced by the specified value.
*
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
* pre-allocate your keys, if possible.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
* @since 1.48.0
*/
default LogRecordBuilder setAttribute(String key, boolean value) {
return setAttribute(booleanKey(key), value);
}
/**
* Sets an Integer attribute on the {@code LogRecord}. If the {@code LogRecord} previously
* contained a mapping for the key, the old value is replaced by the specified value.
*
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
* pre-allocate your keys, if possible.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
* @since 1.48.0
*/
default LogRecordBuilder setAttribute(String key, int value) {
return setAttribute(key, (long) value);
}
/**
* Sets the event name, which identifies the class / type of the Event.
*
* <p>This name should uniquely identify the event structure (both attributes and body). A log
* record with a non-empty event name is an Event.
*
* @since 1.50.0
*/
default LogRecordBuilder setEventName(String eventName) {
return this;
}
/** Emit the log record. */
void emit();

View File

@ -5,6 +5,7 @@
package io.opentelemetry.api.logs;
import io.opentelemetry.api.internal.IncubatingUtil;
import javax.annotation.concurrent.ThreadSafe;
/**
@ -43,6 +44,8 @@ public interface LoggerProvider {
/** Returns a no-op {@link LoggerProvider} which provides Loggers which do not record or emit. */
static LoggerProvider noop() {
return DefaultLoggerProvider.getInstance();
return IncubatingUtil.incubatingApiIfAvailable(
DefaultLoggerProvider.getInstance(),
"io.opentelemetry.api.incubator.logs.ExtendedDefaultLoggerProvider");
}
}

View File

@ -320,8 +320,10 @@ class DefaultMeter implements Meter {
}
private static class NoopDoubleGaugeBuilder implements DoubleGaugeBuilder {
private static final ObservableDoubleGauge NOOP = new ObservableDoubleGauge() {};
private static final ObservableDoubleGauge NOOP_OBSERVABLE_GAUGE =
new ObservableDoubleGauge() {};
private static final LongGaugeBuilder NOOP_LONG_GAUGE_BUILDER = new NoopLongGaugeBuilder();
private static final NoopDoubleGauge NOOP_GAUGE = new NoopDoubleGauge();
@Override
public DoubleGaugeBuilder setDescription(String description) {
@ -340,17 +342,34 @@ class DefaultMeter implements Meter {
@Override
public ObservableDoubleGauge buildWithCallback(Consumer<ObservableDoubleMeasurement> callback) {
return NOOP;
return NOOP_OBSERVABLE_GAUGE;
}
@Override
public ObservableDoubleMeasurement buildObserver() {
return NOOP_OBSERVABLE_DOUBLE_MEASUREMENT;
}
@Override
public DoubleGauge build() {
return NOOP_GAUGE;
}
}
private static class NoopDoubleGauge implements DoubleGauge {
@Override
public void set(double value) {}
@Override
public void set(double value, Attributes attributes) {}
@Override
public void set(double value, Attributes attributes, Context context) {}
}
private static class NoopLongGaugeBuilder implements LongGaugeBuilder {
private static final ObservableLongGauge NOOP = new ObservableLongGauge() {};
private static final ObservableLongGauge NOOP_OBSERVABLE_GAUGE = new ObservableLongGauge() {};
private static final NoopLongGauge NOOP_GAUGE = new NoopLongGauge();
@Override
public LongGaugeBuilder setDescription(String description) {
@ -364,13 +383,29 @@ class DefaultMeter implements Meter {
@Override
public ObservableLongGauge buildWithCallback(Consumer<ObservableLongMeasurement> callback) {
return NOOP;
return NOOP_OBSERVABLE_GAUGE;
}
@Override
public ObservableLongMeasurement buildObserver() {
return NOOP_OBSERVABLE_LONG_MEASUREMENT;
}
@Override
public LongGauge build() {
return NOOP_GAUGE;
}
}
private static class NoopLongGauge implements LongGauge {
@Override
public void set(long value) {}
@Override
public void set(long value, Attributes attributes) {}
@Override
public void set(long value, Attributes attributes, Context context) {}
}
private static class NoopObservableDoubleMeasurement implements ObservableDoubleMeasurement {

View File

@ -5,6 +5,8 @@
package io.opentelemetry.api.metrics;
import io.opentelemetry.api.internal.IncubatingUtil;
/** A {@link MeterProvider} that does nothing. */
class DefaultMeterProvider implements MeterProvider {
@Override
@ -12,7 +14,10 @@ class DefaultMeterProvider implements MeterProvider {
return BUILDER_INSTANCE;
}
private static final DefaultMeterProvider INSTANCE = new DefaultMeterProvider();
private static final MeterProvider INSTANCE =
IncubatingUtil.incubatingApiIfAvailable(
new DefaultMeterProvider(),
"io.opentelemetry.api.incubator.metrics.ExtendedDefaultMeterProvider");
private static final MeterBuilder BUILDER_INSTANCE = new NoopMeterBuilder();
static MeterProvider getInstance() {

View File

@ -3,12 +3,17 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.metrics;
package io.opentelemetry.api.metrics;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.context.Context;
import javax.annotation.concurrent.ThreadSafe;
/** A gauge instrument that synchronously records {@code double} values. */
/**
* A gauge instrument that synchronously records {@code double} values.
*
* @since 1.38.0
*/
@ThreadSafe
public interface DoubleGauge {
/**
@ -26,5 +31,12 @@ public interface DoubleGauge {
*/
void set(double value, Attributes attributes);
// TODO(jack-berg): should we add overload with Context argument?
/**
* Records a value with a set of attributes.
*
* @param value The current gauge value.
* @param attributes A set of attributes to associate with the value.
* @param context The explicit context to associate with this measurement.
*/
void set(double value, Attributes attributes, Context context);
}

View File

@ -65,4 +65,21 @@ public interface DoubleGaugeBuilder {
default ObservableDoubleMeasurement buildObserver() {
return DefaultMeter.getInstance().gaugeBuilder("noop").buildObserver();
}
/**
* Builds and returns a DoubleGauge instrument with the configuration.
*
* <p>NOTE: This produces a synchronous gauge which records gauge values as they occur. Most users
* will want to instead register an {@link #buildWithCallback(Consumer)} to asynchronously observe
* the value of the gauge when metrics are collected.
*
* <p>If using the OpenTelemetry SDK, by default gauges use last value aggregation, such that only
* the value of the last recorded measurement is exported.
*
* @return The DoubleGauge instrument.
* @since 1.38.0
*/
default DoubleGauge build() {
return DefaultMeter.getInstance().gaugeBuilder("noop").build();
}
}

View File

@ -3,12 +3,17 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.metrics;
package io.opentelemetry.api.metrics;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.context.Context;
import javax.annotation.concurrent.ThreadSafe;
/** A gauge instrument that synchronously records {@code long} values. */
/**
* A gauge instrument that synchronously records {@code long} values.
*
* @since 1.38.0
*/
@ThreadSafe
public interface LongGauge {
/**
@ -26,5 +31,12 @@ public interface LongGauge {
*/
void set(long value, Attributes attributes);
// TODO(jack-berg): should we add overload with Context argument?
/**
* Records a value with a set of attributes.
*
* @param value The current gauge value.
* @param attributes A set of attributes to associate with the value.
* @param context The explicit context to associate with this measurement.
*/
void set(long value, Attributes attributes, Context context);
}

View File

@ -62,4 +62,21 @@ public interface LongGaugeBuilder {
default ObservableLongMeasurement buildObserver() {
return DefaultMeter.getInstance().gaugeBuilder("noop").ofLongs().buildObserver();
}
/**
* Builds and returns a LongGauge instrument with the configuration.
*
* <p>NOTE: This produces a synchronous gauge which records gauge values as they occur. Most users
* will want to instead register an {@link #buildWithCallback(Consumer)} to asynchronously observe
* the value of the gauge when metrics are collected.
*
* <p>If using the OpenTelemetry SDK, by default gauges use last value aggregation, such that only
* the value of the last recorded measurement is exported.
*
* @return The LongGauge instrument.
* @since 1.38.0
*/
default LongGauge build() {
return DefaultMeter.getInstance().gaugeBuilder("noop").ofLongs().build();
}
}

View File

@ -65,7 +65,7 @@ public interface Meter {
* callbacks).
*
* @param name the name of the Counter. Instrument names must consist of 255 or fewer characters
* including alphanumeric, _, ., -, and start with a letter.
* including alphanumeric, _, ., -, /, and start with a letter.
* @return a builder for configuring a Counter instrument. Defaults to recording long values, but
* may be changed.
* @see <a
@ -81,7 +81,7 @@ public interface Meter {
* callbacks).
*
* @param name the name of the UpDownCounter. Instrument names must consist of 255 or fewer
* characters including alphanumeric, _, ., -, and start with a letter.
* characters including alphanumeric, _, ., -, /, and start with a letter.
* @return a builder for configuring an UpDownCounter instrument. Defaults to recording long
* values, but may be changed.
* @see <a
@ -94,7 +94,7 @@ public interface Meter {
* Constructs a Histogram instrument.
*
* @param name the name of the Histogram. Instrument names must consist of 255 or fewer characters
* including alphanumeric, _, ., -, and start with a letter.
* including alphanumeric, _, ., -, /, and start with a letter.
* @return a builder for configuring a Histogram synchronous instrument. Defaults to recording
* double values, but may be changed.
* @see <a
@ -107,7 +107,7 @@ public interface Meter {
* Constructs an Asynchronous Gauge instrument.
*
* @param name the name of the Gauge. Instrument names must consist of 255 or fewer characters
* including alphanumeric, _, ., -, and start with a letter.
* including alphanumeric, _, ., -, /, and start with a letter.
* @return a builder used for configuring a Gauge instrument. Defaults to recording double values,
* but may be changed.
* @see <a

View File

@ -5,12 +5,16 @@
package io.opentelemetry.api.trace;
import io.opentelemetry.api.internal.IncubatingUtil;
import javax.annotation.concurrent.ThreadSafe;
@ThreadSafe
class DefaultTracerProvider implements TracerProvider {
private static final TracerProvider INSTANCE = new DefaultTracerProvider();
private static final TracerProvider INSTANCE =
IncubatingUtil.incubatingApiIfAvailable(
new DefaultTracerProvider(),
"io.opentelemetry.api.incubator.trace.ExtendedDefaultTracerProvider");
static TracerProvider getInstance() {
return INSTANCE;

View File

@ -8,6 +8,7 @@ package io.opentelemetry.api.trace;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
/**
@ -42,7 +43,7 @@ final class PropagatedSpan implements Span {
}
@Override
public Span setAttribute(String key, String value) {
public Span setAttribute(String key, @Nullable String value) {
return this;
}
@ -62,7 +63,7 @@ final class PropagatedSpan implements Span {
}
@Override
public <T> Span setAttribute(AttributeKey<T> key, T value) {
public <T> Span setAttribute(AttributeKey<T> key, @Nullable T value) {
return this;
}

View File

@ -88,7 +88,9 @@ public interface Span extends ImplicitContextKeyed {
* Sets an attribute to the {@code Span}. If the {@code Span} previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
* <p>Empty String "" and null are valid attribute {@code value}, but not valid keys.
* <p>Empty String "" and null are valid attribute {@code value}s, but not valid keys.
*
* <p>Note: Providing a null value is a no-op and will not remove previously set values.
*
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
* pre-allocate your keys, if possible.
@ -97,7 +99,7 @@ public interface Span extends ImplicitContextKeyed {
* @param value the value for this attribute.
* @return this.
*/
default Span setAttribute(String key, String value) {
default Span setAttribute(String key, @Nullable String value) {
return setAttribute(AttributeKey.stringKey(key), value);
}
@ -150,13 +152,13 @@ public interface Span extends ImplicitContextKeyed {
* Sets an attribute to the {@code Span}. If the {@code Span} previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
* <p>Note: the behavior of null values is undefined, and hence strongly discouraged.
* <p>Note: Providing a null value is a no-op.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
*/
<T> Span setAttribute(AttributeKey<T> key, T value);
<T> Span setAttribute(AttributeKey<T> key, @Nullable T value);
/**
* Sets an attribute to the {@code Span}. If the {@code Span} previously contained a mapping for

View File

@ -238,6 +238,19 @@ public interface SpanBuilder {
*/
<T> SpanBuilder setAttribute(AttributeKey<T> key, T value);
/**
* Sets an attribute to the newly created {@code Span}. If {@code SpanBuilder} previously
* contained a mapping for the key, the old value is replaced by the specified value.
*
* @param key the key for this attribute.
* @param value the value for this attribute.
* @return this.
* @since 1.45.0
*/
default SpanBuilder setAttribute(AttributeKey<Long> key, int value) {
return setAttribute(key, (long) value);
}
/**
* Sets attributes to the {@link SpanBuilder}. If the {@link SpanBuilder} previously contained a
* mapping for any of the keys, the old values are replaced by the specified values.

View File

@ -18,7 +18,6 @@
* io.opentelemetry.context.Context} and between process using one of the wire propagation formats
* supported in the {@code opentelemetry.trace.propagation} package.
*/
// TODO: Add code examples.
@ParametersAreNonnullByDefault
package io.opentelemetry.api.trace;

View File

@ -5,100 +5,25 @@
package io.opentelemetry.api;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.mock;
import io.opentelemetry.api.logs.LoggerProvider;
import io.opentelemetry.api.metrics.MeterProvider;
import io.opentelemetry.api.testing.internal.AbstractOpenTelemetryTest;
import io.opentelemetry.api.trace.TracerProvider;
import io.opentelemetry.context.propagation.ContextPropagators;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
class OpenTelemetryTest {
class OpenTelemetryTest extends AbstractOpenTelemetryTest {
@BeforeAll
static void beforeClass() {
GlobalOpenTelemetry.resetForTest();
@Override
protected TracerProvider getTracerProvider() {
return TracerProvider.noop();
}
@AfterEach
void after() {
GlobalOpenTelemetry.resetForTest();
@Override
protected MeterProvider getMeterProvider() {
return MeterProvider.noop();
}
@Test
void testDefault() {
assertThat(OpenTelemetry.noop().getTracerProvider()).isSameAs(TracerProvider.noop());
assertThat(OpenTelemetry.noop().getPropagators()).isSameAs(ContextPropagators.noop());
assertThat(OpenTelemetry.noop().getMeterProvider()).isSameAs(MeterProvider.noop());
assertThat(OpenTelemetry.noop().getLogsBridge()).isSameAs(LoggerProvider.noop());
}
@Test
void propagating() {
ContextPropagators contextPropagators = mock(ContextPropagators.class);
OpenTelemetry openTelemetry = OpenTelemetry.propagating(contextPropagators);
assertThat(openTelemetry.getTracerProvider()).isSameAs(TracerProvider.noop());
assertThat(openTelemetry.getMeterProvider()).isSameAs(MeterProvider.noop());
assertThat(openTelemetry.getLogsBridge()).isSameAs(LoggerProvider.noop());
assertThat(openTelemetry.getPropagators()).isSameAs(contextPropagators);
}
@Test
void testGlobalBeforeSet() {
assertThat(GlobalOpenTelemetry.getTracerProvider()).isSameAs(TracerProvider.noop());
assertThat(GlobalOpenTelemetry.getTracerProvider())
.isSameAs(GlobalOpenTelemetry.getTracerProvider());
assertThat(GlobalOpenTelemetry.getPropagators()).isSameAs(GlobalOpenTelemetry.getPropagators());
}
@Test
void independentNonGlobalPropagators() {
ContextPropagators propagators1 = mock(ContextPropagators.class);
OpenTelemetry otel1 = OpenTelemetry.propagating(propagators1);
ContextPropagators propagators2 = mock(ContextPropagators.class);
OpenTelemetry otel2 = OpenTelemetry.propagating(propagators2);
assertThat(otel1.getPropagators()).isSameAs(propagators1);
assertThat(otel2.getPropagators()).isSameAs(propagators2);
}
@Test
void setThenSet() {
setOpenTelemetry();
assertThatThrownBy(() -> GlobalOpenTelemetry.set(OpenTelemetry.noop()))
.isInstanceOf(IllegalStateException.class)
.hasMessageContaining("GlobalOpenTelemetry.set has already been called")
.hasStackTraceContaining("setOpenTelemetry");
}
@Test
void getThenSet() {
assertThat(getOpenTelemetry()).isInstanceOf(DefaultOpenTelemetry.class);
assertThatThrownBy(() -> GlobalOpenTelemetry.set(OpenTelemetry.noop()))
.isInstanceOf(IllegalStateException.class)
.hasMessageContaining("GlobalOpenTelemetry.set has already been called")
.hasStackTraceContaining("getOpenTelemetry");
}
@Test
void toString_noop_Valid() {
assertThat(OpenTelemetry.noop().toString())
.isEqualTo(
"DefaultOpenTelemetry{"
+ "propagators=DefaultContextPropagators{textMapPropagator=NoopTextMapPropagator}"
+ "}");
}
private static void setOpenTelemetry() {
GlobalOpenTelemetry.set(OpenTelemetry.noop());
}
private static OpenTelemetry getOpenTelemetry() {
return GlobalOpenTelemetry.get();
@Override
protected LoggerProvider getLoggerProvider() {
return LoggerProvider.noop();
}
}

View File

@ -9,6 +9,10 @@ import static org.assertj.core.api.Assertions.assertThat;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
import javax.annotation.Nullable;
import org.junit.jupiter.api.Test;
class BaggageTest {
@ -27,4 +31,45 @@ class BaggageTest {
assertThat(result.getEntryValue("foo")).isEqualTo("bar");
}
}
@Test
void getEntryDefault() {
BaggageEntryMetadata metadata = BaggageEntryMetadata.create("flib");
Map<String, BaggageEntry> result = new HashMap<>();
result.put("a", ImmutableEntry.create("b", metadata));
// Implementation that only implements asMap() which is used by getEntry()
Baggage baggage =
new Baggage() {
@Override
public Map<String, BaggageEntry> asMap() {
return result;
}
@Override
public int size() {
return 0;
}
@Override
public void forEach(BiConsumer<? super String, ? super BaggageEntry> consumer) {
result.forEach(consumer);
}
@Nullable
@Override
public String getEntryValue(String entryKey) {
return null;
}
@Override
public BaggageBuilder toBuilder() {
return null;
}
};
BaggageEntry entry = baggage.getEntry("a");
assertThat(entry.getValue()).isEqualTo("b");
assertThat(entry.getMetadata().getValue()).isEqualTo("flib");
}
}

View File

@ -9,6 +9,8 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
import com.google.common.testing.EqualsTester;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope;
import org.junit.jupiter.api.Test;
/**
@ -190,4 +192,15 @@ class ImmutableBaggageTest {
.addEqualityGroup(baggage2, baggage3)
.testEquals();
}
@Test
void getEntry() {
BaggageEntryMetadata metadata = BaggageEntryMetadata.create("flib");
try (Scope scope =
Context.root().with(Baggage.builder().put("a", "b", metadata).build()).makeCurrent()) {
Baggage result = Baggage.current();
assertThat(result.getEntry("a").getValue()).isEqualTo("b");
assertThat(result.getEntry("a").getMetadata().getValue()).isEqualTo("flib");
}
}
}

View File

@ -8,6 +8,7 @@ package io.opentelemetry.api.baggage.propagation;
import static java.util.Collections.singletonMap;
import static org.assertj.core.api.Assertions.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import io.opentelemetry.api.baggage.Baggage;
import io.opentelemetry.api.baggage.BaggageEntryMetadata;
@ -15,7 +16,9 @@ import io.opentelemetry.context.Context;
import io.opentelemetry.context.propagation.TextMapGetter;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import org.junit.jupiter.api.Test;
@ -36,6 +39,28 @@ class W3CBaggagePropagatorTest {
}
};
private static final TextMapGetter<Map<String, List<String>>> multiGetter =
new TextMapGetter<Map<String, List<String>>>() {
@Override
public Iterable<String> keys(Map<String, List<String>> carrier) {
return carrier.keySet();
}
@Nullable
@Override
public String get(Map<String, List<String>> carrier, String key) {
return carrier.getOrDefault(key, Collections.emptyList()).stream()
.findFirst()
.orElse(null);
}
@Override
public Iterator<String> getAll(Map<String, List<String>> carrier, String key) {
List<String> values = carrier.get(key);
return values == null ? Collections.emptyIterator() : values.iterator();
}
};
@Test
void fields() {
assertThat(W3CBaggagePropagator.getInstance().fields()).containsExactly("baggage");
@ -421,6 +446,101 @@ class W3CBaggagePropagatorTest {
.isSameAs(context);
}
@Test
void extract_multiple_headers() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Context result =
propagator.extract(
Context.root(),
ImmutableMap.of("baggage", ImmutableList.of("k1=v1", "k2=v2")),
multiGetter);
Baggage expectedBaggage = Baggage.builder().put("k1", "v1").put("k2", "v2").build();
assertThat(Baggage.fromContext(result)).isEqualTo(expectedBaggage);
}
@Test
void extract_multiple_headers_duplicate_key() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Context result =
propagator.extract(
Context.root(),
ImmutableMap.of("baggage", ImmutableList.of("k1=v1", "k1=v2")),
multiGetter);
Baggage expectedBaggage = Baggage.builder().put("k1", "v2").build();
assertThat(Baggage.fromContext(result)).isEqualTo(expectedBaggage);
}
@Test
void extract_multiple_headers_mixed_duplicates_non_duplicates() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Context result =
propagator.extract(
Context.root(),
ImmutableMap.of("baggage", ImmutableList.of("k1=v1,k2=v0", "k2=v2,k3=v3")),
multiGetter);
Baggage expectedBaggage =
Baggage.builder().put("k1", "v1").put("k2", "v2").put("k3", "v3").build();
assertThat(Baggage.fromContext(result)).isEqualTo(expectedBaggage);
}
@Test
void extract_multiple_headers_all_empty() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Context result =
propagator.extract(
Context.root(), ImmutableMap.of("baggage", ImmutableList.of("", "")), multiGetter);
Baggage expectedBaggage = Baggage.builder().build();
assertThat(Baggage.fromContext(result)).isEqualTo(expectedBaggage);
}
@Test
void extract_multiple_headers_some_empty() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Context result =
propagator.extract(
Context.root(), ImmutableMap.of("baggage", ImmutableList.of("", "k=v")), multiGetter);
Baggage expectedBaggage = Baggage.builder().put("k", "v").build();
assertThat(Baggage.fromContext(result)).isEqualTo(expectedBaggage);
}
@Test
void extract_multiple_headers_all_invalid() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Context result =
propagator.extract(
Context.root(),
ImmutableMap.of("baggage", ImmutableList.of("!@#$%^", "key=va%lue")),
multiGetter);
Baggage expectedBaggage = Baggage.builder().build();
assertThat(Baggage.fromContext(result)).isEqualTo(expectedBaggage);
}
@Test
void extract_multiple_headers_some_invalid() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Context result =
propagator.extract(
Context.root(),
ImmutableMap.of("baggage", ImmutableList.of("k1=v1", "key=va%lue", "k2=v2")),
multiGetter);
Baggage expectedBaggage = Baggage.builder().put("k1", "v1").put("k2", "v2").build();
assertThat(Baggage.fromContext(result)).isEqualTo(expectedBaggage);
}
@Test
void inject_noBaggage() {
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
@ -448,6 +568,7 @@ class W3CBaggagePropagatorTest {
.put("\2ab\3cd", "wacky key nonprintable")
.put(null, "null key")
.put("nullvalue", null)
.put(" ", "key is only space")
.build();
W3CBaggagePropagator propagator = W3CBaggagePropagator.getInstance();
Map<String, String> carrier = new HashMap<>();

View File

@ -26,6 +26,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.Nullable;
import org.junit.jupiter.api.Test;
/** Unit tests for {@link Attributes}s. */
@ -565,7 +566,7 @@ class AttributesTest {
}
@Override
public <T> AttributesBuilder put(AttributeKey<T> key, T value) {
public <T> AttributesBuilder put(AttributeKey<T> key, @Nullable T value) {
return null;
}

View File

@ -6,7 +6,15 @@
package io.opentelemetry.api.internal;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.SetSystemProperty;
@ -56,4 +64,45 @@ class ConfigUtilTest {
assertThat(ConfigUtil.defaultIfNull("val1", "val2")).isEqualTo("val1");
assertThat(ConfigUtil.defaultIfNull(null, "val2")).isEqualTo("val2");
}
@Test
@SuppressWarnings("ReturnValueIgnored")
void systemPropertiesConcurrentAccess() throws ExecutionException, InterruptedException {
int threads = 4;
ExecutorService executor = Executors.newFixedThreadPool(threads);
try {
int cycles = 1000;
CountDownLatch latch = new CountDownLatch(1);
List<Future<?>> futures = new ArrayList<>();
for (int i = 0; i < threads; i++) {
futures.add(
executor.submit(
() -> {
try {
latch.await();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
for (int j = 0; j < cycles; j++) {
String property = "prop " + j;
System.setProperty(property, "a");
System.getProperties().remove(property);
}
}));
}
latch.countDown();
for (int i = 0; i < cycles; i++) {
assertThatCode(() -> ConfigUtil.getString("x", "y")).doesNotThrowAnyException();
}
for (Future<?> future : futures) {
future.get();
}
} finally {
executor.shutdownNow();
}
}
}

View File

@ -0,0 +1,27 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.internal;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import io.opentelemetry.context.Context;
import org.junit.jupiter.api.Test;
class InstrumentationUtilTest {
@Test
void verifySuppressInstrumentation() {
// Should be false by default.
assertFalse(InstrumentationUtil.shouldSuppressInstrumentation(Context.current()));
// Should be true inside the Runnable passed to InstrumentationUtil.suppressInstrumentation.
InstrumentationUtil.suppressInstrumentation(
() -> assertTrue(InstrumentationUtil.shouldSuppressInstrumentation(Context.current())));
// Should be false after the runnable finishes.
assertFalse(InstrumentationUtil.shouldSuppressInstrumentation(Context.current()));
}
}

View File

@ -1,33 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.logs;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import org.junit.jupiter.api.Test;
class DefaultLoggerProviderTest {
@Test
void noopLoggerProvider_doesNotThrow() {
LoggerProvider provider = LoggerProvider.noop();
assertThat(provider).isSameAs(DefaultLoggerProvider.getInstance());
assertThatCode(() -> provider.get("scope-name")).doesNotThrowAnyException();
assertThatCode(
() ->
provider
.loggerBuilder("scope-name")
.setInstrumentationVersion("1.0")
.setSchemaUrl("http://schema.com")
.build())
.doesNotThrowAnyException();
assertThatCode(() -> provider.loggerBuilder("scope-name").build().logRecordBuilder())
.doesNotThrowAnyException();
}
}

View File

@ -5,34 +5,17 @@
package io.opentelemetry.api.logs;
import static org.assertj.core.api.Assertions.assertThatCode;
import io.opentelemetry.api.testing.internal.AbstractDefaultLoggerTest;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.context.Context;
import java.time.Instant;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.Test;
class DefaultLoggerTest extends AbstractDefaultLoggerTest {
class DefaultLoggerTest {
@Override
protected LoggerProvider getLoggerProvider() {
return DefaultLoggerProvider.getInstance();
}
@Test
void buildAndEmit() {
assertThatCode(
() ->
DefaultLogger.getInstance()
.logRecordBuilder()
.setTimestamp(100, TimeUnit.SECONDS)
.setTimestamp(Instant.now())
.setObservedTimestamp(100, TimeUnit.SECONDS)
.setObservedTimestamp(Instant.now())
.setContext(Context.root())
.setSeverity(Severity.DEBUG)
.setSeverityText("debug")
.setBody("body")
.setAttribute(AttributeKey.stringKey("key1"), "value1")
.setAllAttributes(Attributes.builder().put("key2", "value2").build())
.emit())
.doesNotThrowAnyException();
@Override
protected Logger getLogger() {
return DefaultLogger.getInstance();
}
}

View File

@ -0,0 +1,215 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.logs;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.params.provider.Arguments.arguments;
import io.opentelemetry.api.common.KeyValue;
import io.opentelemetry.api.common.Value;
import io.opentelemetry.api.common.ValueType;
import java.nio.ByteBuffer;
import java.nio.ReadOnlyBufferException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Base64;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Stream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
class ValueTest {
@Test
void value_OfString() {
assertThat(Value.of("foo"))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.STRING);
assertThat(value.getValue()).isEqualTo("foo");
assertThat(value).hasSameHashCodeAs(Value.of("foo"));
});
}
@Test
void value_OfBoolean() {
assertThat(Value.of(true))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.BOOLEAN);
assertThat(value.getValue()).isEqualTo(true);
assertThat(value).hasSameHashCodeAs(Value.of(true));
});
}
@Test
void value_OfLong() {
assertThat(Value.of(1L))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.LONG);
assertThat(value.getValue()).isEqualTo(1L);
assertThat(value).hasSameHashCodeAs(Value.of(1L));
});
}
@Test
void value_OfDouble() {
assertThat(Value.of(1.1))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.DOUBLE);
assertThat(value.getValue()).isEqualTo(1.1);
assertThat(value).hasSameHashCodeAs(Value.of(1.1));
});
}
@Test
void value_OfByteArray() {
assertThat(Value.of(new byte[] {'a', 'b'}))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.BYTES);
ByteBuffer buf = value.getValue();
// ValueBytes returns read only view of ByteBuffer
assertThatThrownBy(buf::array).isInstanceOf(ReadOnlyBufferException.class);
byte[] bytes = new byte[buf.remaining()];
buf.get(bytes);
assertThat(bytes).isEqualTo(new byte[] {'a', 'b'});
assertThat(value).hasSameHashCodeAs(Value.of(new byte[] {'a', 'b'}));
});
}
@Test
void value_OfvalueArray() {
assertThat(Value.of(Value.of(true), Value.of(1L)))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.ARRAY);
assertThat(value.getValue()).isEqualTo(Arrays.asList(Value.of(true), Value.of(1L)));
assertThat(value).hasSameHashCodeAs(Value.of(Value.of(true), Value.of(1L)));
});
}
@Test
@SuppressWarnings("DoubleBraceInitialization")
void value_OfKeyValueList() {
assertThat(Value.of(KeyValue.of("bool", Value.of(true)), KeyValue.of("long", Value.of(1L))))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.KEY_VALUE_LIST);
assertThat(value.getValue())
.isEqualTo(
Arrays.asList(
KeyValue.of("bool", Value.of(true)), KeyValue.of("long", Value.of(1L))));
assertThat(value)
.hasSameHashCodeAs(
Value.of(
KeyValue.of("bool", Value.of(true)), KeyValue.of("long", Value.of(1L))));
});
assertThat(
Value.of(
new LinkedHashMap<String, Value<?>>() {
{
put("bool", Value.of(true));
put("long", Value.of(1L));
}
}))
.satisfies(
value -> {
assertThat(value.getType()).isEqualTo(ValueType.KEY_VALUE_LIST);
assertThat(value.getValue())
.isEqualTo(
Arrays.asList(
KeyValue.of("bool", Value.of(true)), KeyValue.of("long", Value.of(1L))));
assertThat(value)
.hasSameHashCodeAs(
Value.of(
new LinkedHashMap<String, Value<?>>() {
{
put("bool", Value.of(true));
put("long", Value.of(1L));
}
}));
});
}
@Test
void value_NullsNotAllowed() {
assertThatThrownBy(() -> Value.of((String) null))
.isInstanceOf(NullPointerException.class)
.hasMessageContaining("value must not be null");
assertThatThrownBy(() -> Value.of((byte[]) null))
.isInstanceOf(NullPointerException.class)
.hasMessageContaining("value must not be null");
assertThatThrownBy(() -> Value.of((Value<?>[]) null))
.isInstanceOf(NullPointerException.class)
.hasMessageContaining("value must not be null");
assertThatThrownBy(() -> Value.of((KeyValue[]) null))
.isInstanceOf(NullPointerException.class)
.hasMessageContaining("value must not be null");
assertThatThrownBy(() -> Value.of((Map<String, Value<?>>) null))
.isInstanceOf(NullPointerException.class)
.hasMessageContaining("value must not be null");
}
@ParameterizedTest
@MethodSource("asStringArgs")
void asString(Value<?> value, String expectedAsString) {
assertThat(value.asString()).isEqualTo(expectedAsString);
}
@SuppressWarnings("DoubleBraceInitialization")
private static Stream<Arguments> asStringArgs() {
return Stream.of(
// primitives
arguments(Value.of("str"), "str"),
arguments(Value.of(true), "true"),
arguments(Value.of(1), "1"),
arguments(Value.of(1.1), "1.1"),
// heterogeneous array
arguments(
Value.of(Value.of("str"), Value.of(true), Value.of(1), Value.of(1.1)),
"[str, true, 1, 1.1]"),
// key value list from KeyValue array
arguments(
Value.of(KeyValue.of("key1", Value.of("val1")), KeyValue.of("key2", Value.of(2))),
"[key1=val1, key2=2]"),
// key value list from map
arguments(
Value.of(
new LinkedHashMap<String, Value<?>>() {
{
put("key1", Value.of("val1"));
put("key2", Value.of(2));
}
}),
"[key1=val1, key2=2]"),
// map of map
arguments(
Value.of(
Collections.singletonMap(
"child", Value.of(Collections.singletonMap("grandchild", Value.of("str"))))),
"[child=[grandchild=str]]"),
// bytes
arguments(Value.of("hello world".getBytes(StandardCharsets.UTF_8)), "aGVsbG8gd29ybGQ="));
}
@Test
void valueByteAsString() {
// TODO: add more test cases
String str = "hello world";
String base64Encoded = Value.of(str.getBytes(StandardCharsets.UTF_8)).asString();
byte[] decodedBytes = Base64.getDecoder().decode(base64Encoded);
assertThat(new String(decodedBytes, StandardCharsets.UTF_8)).isEqualTo(str);
}
}

View File

@ -1,29 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.metrics;
import org.junit.jupiter.api.Test;
public class DefaultMeterProviderTest {
@Test
void noopMeterProvider_getDoesNotThrow() {
MeterProvider provider = MeterProvider.noop();
provider.get("user-instrumentation");
}
@Test
void noopMeterProvider_builderDoesNotThrow() {
MeterProvider provider = MeterProvider.noop();
provider.meterBuilder("user-instrumentation").build();
provider.meterBuilder("advanced-instrumetnation").setInstrumentationVersion("1.0").build();
provider.meterBuilder("schema-instrumentation").setSchemaUrl("myschema://url").build();
provider
.meterBuilder("schema-instrumentation")
.setInstrumentationVersion("1.0")
.setSchemaUrl("myschema://url")
.build();
}
}

View File

@ -5,172 +5,17 @@
package io.opentelemetry.api.metrics;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import io.opentelemetry.api.testing.internal.AbstractDefaultMeterTest;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.context.Context;
import io.opentelemetry.internal.testing.slf4j.SuppressLogger;
import org.junit.jupiter.api.Test;
public class DefaultMeterTest extends AbstractDefaultMeterTest {
@SuppressLogger()
public class DefaultMeterTest {
private static final Meter METER = DefaultMeter.getInstance();
@Test
void noopLongCounter_doesNotThrow() {
LongCounter counter =
METER.counterBuilder("size").setDescription("The size I'm measuring").setUnit("1").build();
counter.add(1);
counter.add(1, Attributes.of(stringKey("thing"), "car"));
counter.add(1, Attributes.of(stringKey("thing"), "car"), Context.current());
@Override
protected Meter getMeter() {
return DefaultMeter.getInstance();
}
@Test
void noopDoubleCounter_doesNotThrow() {
DoubleCounter counter =
METER
.counterBuilder("size")
.ofDoubles()
.setDescription("The size I'm measuring")
.setUnit("1")
.build();
counter.add(1.2);
counter.add(2.5, Attributes.of(stringKey("thing"), "car"));
counter.add(2.5, Attributes.of(stringKey("thing"), "car"), Context.current());
}
@Test
void noopLongUpDownCounter_doesNotThrow() {
LongUpDownCounter counter =
METER
.upDownCounterBuilder("size")
.setDescription("The size I'm measuring")
.setUnit("1")
.build();
counter.add(-1);
counter.add(1, Attributes.of(stringKey("thing"), "car"));
counter.add(1, Attributes.of(stringKey("thing"), "car"), Context.current());
}
@Test
void noopDoubleUpDownCounter_doesNotThrow() {
DoubleUpDownCounter counter =
METER
.upDownCounterBuilder("size")
.ofDoubles()
.setDescription("The size I'm measuring")
.setUnit("1")
.build();
counter.add(-2e4);
counter.add(1.0e-1, Attributes.of(stringKey("thing"), "car"));
counter.add(1.0e-1, Attributes.of(stringKey("thing"), "car"), Context.current());
}
@Test
void noopLongHistogram_doesNotThrow() {
LongHistogram histogram =
METER
.histogramBuilder("size")
.ofLongs()
.setDescription("The size I'm measuring")
.setUnit("1")
.build();
histogram.record(-1);
histogram.record(1, Attributes.of(stringKey("thing"), "car"));
histogram.record(1, Attributes.of(stringKey("thing"), "car"), Context.current());
}
@Test
void noopDoubleHistogram_doesNotThrow() {
DoubleHistogram histogram =
METER
.histogramBuilder("size")
.setDescription("The size I'm measuring")
.setUnit("1")
.build();
histogram.record(-2e4);
histogram.record(1.0e-1, Attributes.of(stringKey("thing"), "car"));
histogram.record(1.0e-1, Attributes.of(stringKey("thing"), "car"), Context.current());
}
@Test
void noopObservableLongGauage_doesNotThrow() {
METER
.gaugeBuilder("temperature")
.ofLongs()
.setDescription("The current temperature")
.setUnit("C")
.buildWithCallback(
m -> {
m.record(1);
m.record(2, Attributes.of(stringKey("thing"), "engine"));
});
}
@Test
void noopObservableDoubleGauage_doesNotThrow() {
METER
.gaugeBuilder("temperature")
.setDescription("The current temperature")
.setUnit("C")
.buildWithCallback(
m -> {
m.record(1.0e1);
m.record(-27.4, Attributes.of(stringKey("thing"), "engine"));
});
}
@Test
void noopObservableLongCounter_doesNotThrow() {
METER
.counterBuilder("temperature")
.setDescription("The current temperature")
.setUnit("C")
.buildWithCallback(
m -> {
m.record(1);
m.record(2, Attributes.of(stringKey("thing"), "engine"));
});
}
@Test
void noopObservableDoubleCounter_doesNotThrow() {
METER
.counterBuilder("temperature")
.ofDoubles()
.setDescription("The current temperature")
.setUnit("C")
.buildWithCallback(
m -> {
m.record(1.0e1);
m.record(-27.4, Attributes.of(stringKey("thing"), "engine"));
});
}
@Test
void noopObservableLongUpDownCounter_doesNotThrow() {
METER
.upDownCounterBuilder("temperature")
.setDescription("The current temperature")
.setUnit("C")
.buildWithCallback(
m -> {
m.record(1);
m.record(2, Attributes.of(stringKey("thing"), "engine"));
});
}
@Test
void noopObservableDoubleUpDownCounter_doesNotThrow() {
METER
.upDownCounterBuilder("temperature")
.ofDoubles()
.setDescription("The current temperature")
.setUnit("C")
.buildWithCallback(
m -> {
m.record(1.0e1);
m.record(-27.4, Attributes.of(stringKey("thing"), "engine"));
});
@Override
protected MeterProvider getMeterProvider() {
return DefaultMeterProvider.getInstance();
}
}

View File

@ -1,19 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.trace;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
class DefaultTracerProviderTest {
@Test
void returnsDefaultTracer() {
assertThat(TracerProvider.noop().get("test")).isInstanceOf(DefaultTracer.class);
assertThat(TracerProvider.noop().get("test", "1.0")).isInstanceOf(DefaultTracer.class);
}
}

View File

@ -5,89 +5,17 @@
package io.opentelemetry.api.trace;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import io.opentelemetry.api.testing.internal.AbstractDefaultTracerTest;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.context.Context;
import org.junit.jupiter.api.Test;
class DefaultTracerTest extends AbstractDefaultTracerTest {
/** Unit tests for {@link DefaultTracer}. */
// Need to suppress warnings for MustBeClosed because Android 14 does not support
// try-with-resources.
@SuppressWarnings("MustBeClosedChecker")
class DefaultTracerTest {
private static final Tracer defaultTracer = DefaultTracer.getInstance();
private static final String SPAN_NAME = "MySpanName";
private static final SpanContext spanContext =
SpanContext.create(
"00000000000000000000000000000061",
"0000000000000061",
TraceFlags.getDefault(),
TraceState.getDefault());
@Test
void defaultSpanBuilderWithName() {
assertThat(defaultTracer.spanBuilder(SPAN_NAME).startSpan().getSpanContext().isValid())
.isFalse();
@Override
public Tracer getTracer() {
return DefaultTracer.getInstance();
}
@Test
void testSpanContextPropagationExplicitParent() {
Span span =
defaultTracer
.spanBuilder(SPAN_NAME)
.setParent(Context.root().with(Span.wrap(spanContext)))
.startSpan();
assertThat(span.getSpanContext()).isSameAs(spanContext);
}
@Test
void testSpanContextPropagation() {
Span parent = Span.wrap(spanContext);
Span span =
defaultTracer.spanBuilder(SPAN_NAME).setParent(Context.root().with(parent)).startSpan();
assertThat(span.getSpanContext()).isSameAs(spanContext);
}
@Test
void noSpanContextMakesInvalidSpans() {
Span span = defaultTracer.spanBuilder(SPAN_NAME).startSpan();
assertThat(span.getSpanContext()).isSameAs(SpanContext.getInvalid());
}
@Test
void testSpanContextPropagation_fromContext() {
Context context = Context.current().with(Span.wrap(spanContext));
Span span = defaultTracer.spanBuilder(SPAN_NAME).setParent(context).startSpan();
assertThat(span.getSpanContext()).isSameAs(spanContext);
}
@Test
void testSpanContextPropagation_fromContextAfterNoParent() {
Context context = Context.current().with(Span.wrap(spanContext));
Span span = defaultTracer.spanBuilder(SPAN_NAME).setNoParent().setParent(context).startSpan();
assertThat(span.getSpanContext()).isSameAs(spanContext);
}
@Test
void testSpanContextPropagation_fromContextThenNoParent() {
Context context = Context.current().with(Span.wrap(spanContext));
Span span = defaultTracer.spanBuilder(SPAN_NAME).setParent(context).setNoParent().startSpan();
assertThat(span.getSpanContext()).isEqualTo(SpanContext.getInvalid());
}
@Test
void addLink() {
Span span = Span.fromContext(Context.root());
assertThatCode(() -> span.addLink(null)).doesNotThrowAnyException();
assertThatCode(() -> span.addLink(SpanContext.getInvalid())).doesNotThrowAnyException();
assertThatCode(() -> span.addLink(null, null)).doesNotThrowAnyException();
assertThatCode(() -> span.addLink(SpanContext.getInvalid(), Attributes.empty()))
.doesNotThrowAnyException();
@Override
public TracerProvider getTracerProvider() {
return DefaultTracerProvider.getInstance();
}
}

View File

@ -1,65 +0,0 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.trace;
import static io.opentelemetry.api.common.AttributeKey.stringKey;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.context.Context;
import java.time.Instant;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.Test;
/** Unit tests for {@link SpanBuilder}. */
class SpanBuilderTest {
private final Tracer tracer = DefaultTracer.getInstance();
@Test
void doNotCrash_NoopImplementation() {
assertThatCode(
() -> {
SpanBuilder spanBuilder = tracer.spanBuilder(null);
spanBuilder.setSpanKind(null);
spanBuilder.setParent(null);
spanBuilder.setNoParent();
spanBuilder.addLink(null);
spanBuilder.addLink(null, Attributes.empty());
spanBuilder.addLink(SpanContext.getInvalid(), null);
spanBuilder.setAttribute((String) null, "foo");
spanBuilder.setAttribute("foo", null);
spanBuilder.setAttribute(null, 0L);
spanBuilder.setAttribute(null, 0.0);
spanBuilder.setAttribute(null, false);
spanBuilder.setAttribute((AttributeKey<String>) null, "foo");
spanBuilder.setAttribute(stringKey(null), "foo");
spanBuilder.setAttribute(stringKey(""), "foo");
spanBuilder.setAttribute(stringKey("foo"), null);
spanBuilder.setStartTimestamp(-1, TimeUnit.MILLISECONDS);
spanBuilder.setStartTimestamp(1, null);
spanBuilder.setParent(Context.root().with(Span.wrap(null)));
spanBuilder.setParent(Context.root());
spanBuilder.setNoParent();
spanBuilder.addLink(Span.getInvalid().getSpanContext());
spanBuilder.addLink(Span.getInvalid().getSpanContext(), Attributes.empty());
spanBuilder.setAttribute("key", "value");
spanBuilder.setAttribute("key", 12345L);
spanBuilder.setAttribute("key", .12345);
spanBuilder.setAttribute("key", true);
spanBuilder.setAttribute(stringKey("key"), "value");
spanBuilder.setAllAttributes(Attributes.of(stringKey("key"), "value"));
spanBuilder.setAllAttributes(Attributes.empty());
spanBuilder.setAllAttributes(null);
spanBuilder.setStartTimestamp(12345L, TimeUnit.NANOSECONDS);
spanBuilder.setStartTimestamp(Instant.EPOCH);
spanBuilder.setStartTimestamp(null);
assertThat(spanBuilder.startSpan().getSpanContext().isValid()).isFalse();
})
.doesNotThrowAnyException();
}
}

View File

@ -1,167 +1,38 @@
# ExtendedTracer
# API Incubator
Utility methods to make it easier to use the OpenTelemetry tracer.
Experimental APIs, including Event API, extended Log Bridge APIs, extended Metrics APIs, extended ContextPropagator APIs, and extended Trace APIs.
## Usage Examples
## Extended Log Bridge API
Here are some examples how the utility methods can help reduce boilerplate code.
Features:
### Tracing a function
* Check if logger is enabled before emitting logs to avoid unnecessary computation
* Add extended attributes to log records to encode complex data structures
Before:
See [ExtendedLogsBridgeApiUsageTest](./src/test/java/io/opentelemetry/api/incubator/logs/ExtendedLogsBridgeApiUsageTest.java).
<!-- markdownlint-disable -->
```java
Span span = tracer.spanBuilder("reset_checkout").startSpan();
String transactionId;
try (Scope scope = span.makeCurrent()) {
transactionId = resetCheckout(cartId);
} catch (Throwable e) {
span.setStatus(StatusCode.ERROR);
span.recordException(e);
throw e; // or throw new RuntimeException(e) - depending on your error handling strategy
} finally {
span.end();
}
```
<!-- markdownlint-enable -->
## Extended Metrics APIs
After:
Features:
```java
import io.opentelemetry.extension.incubator.trace.ExtendedTracer;
* Attributes advice
ExtendedTracer extendedTracer = ExtendedTracer.create(tracer);
String transactionId = extendedTracer.spanBuilder("reset_checkout").startAndCall(() -> resetCheckout(cartId));
```
See [ExtendedMetricsApiUsageTest](./src/test/java/io/opentelemetry/api/incubator/metrics/ExtendedMetricsApiUsageTest.java).
If you want to set attributes on the span, you can use the `startAndCall` method on the span builder:
## Extended ContextPropagator APIs
```java
import io.opentelemetry.extension.incubator.trace.ExtendedTracer;
Features:
ExtendedTracer extendedTracer = ExtendedTracer.create(tracer);
String transactionId = extendedTracer.spanBuilder("reset_checkout")
.setAttribute("foo", "bar")
.startAndCall(() -> resetCheckout(cartId));
```
* Check if instrument is enabled before recording measurements to avoid unnecessary computation
* Simplified injection / extraction of context
Note:
See [ExtendedContextPropagatorsUsageTest](./src/test/java/io/opentelemetry/api/incubator/propagation/ExtendedContextPropagatorsUsageTest.java).
- Use `startAndRun` instead of `startAndCall` if the function returns `void` (both on the tracer and span builder).
- Exceptions are re-thrown without modification - see [Exception handling](#exception-handling)
for more details.
## Extended Trace APIs
### Trace context propagation
Features:
Before:
* Check if tracer is enabled before starting spans to avoid unnecessary computation
* Utility methods to reduce boilerplace using span API, including extracting context, and wrapping runnables / callables with spans
```java
Map<String, String> propagationHeaders = new HashMap<>();
openTelemetry
.getPropagators()
.getTextMapPropagator()
.inject(
Context.current(),
propagationHeaders,
(map, key, value) -> {
if (map != null) {
map.put(key, value);
}
});
// add propagationHeaders to request headers and call checkout service
```
<!-- markdownlint-disable -->
```java
// in checkout service: get request headers into a Map<String, String> requestHeaders
Map<String, String> requestHeaders = new HashMap<>();
String cartId = "cartId";
SpanBuilder spanBuilder = tracer.spanBuilder("checkout_cart");
TextMapGetter<Map<String, String>> TEXT_MAP_GETTER =
new TextMapGetter<Map<String, String>>() {
@Override
public Set<String> keys(Map<String, String> carrier) {
return carrier.keySet();
}
@Override
@Nullable
public String get(@Nullable Map<String, String> carrier, String key) {
return carrier == null ? null : carrier.get(key);
}
};
Map<String, String> normalizedTransport =
requestHeaders.entrySet().stream()
.collect(
Collectors.toMap(
entry -> entry.getKey().toLowerCase(Locale.ROOT), Map.Entry::getValue));
Context newContext = openTelemetry
.getPropagators()
.getTextMapPropagator()
.extract(Context.current(), normalizedTransport, TEXT_MAP_GETTER);
String transactionId;
try (Scope ignore = newContext.makeCurrent()) {
Span span = spanBuilder.setSpanKind(SERVER).startSpan();
try (Scope scope = span.makeCurrent()) {
transactionId = processCheckout(cartId);
} catch (Throwable e) {
span.setStatus(StatusCode.ERROR);
span.recordException(e);
throw e; // or throw new RuntimeException(e) - depending on your error handling strategy
} finally {
span.end();
}
}
```
<!-- markdownlint-enable -->
After:
```java
import io.opentelemetry.extension.incubator.propagation.ExtendedContextPropagators;
Map<String, String> propagationHeaders =
ExtendedContextPropagators.getTextMapPropagationContext(openTelemetry.getPropagators());
// add propagationHeaders to request headers and call checkout service
```
```java
import io.opentelemetry.api.trace.SpanKind;
import io.opentelemetry.extension.incubator.trace.ExtendedTracer;
// in checkout service: get request headers into a Map<String, String> requestHeaders
Map<String, String> requestHeaders = new HashMap<>();
String cartId = "cartId";
ExtendedTracer extendedTracer = ExtendedTracer.create(tracer);
String transactionId = extendedTracer.spanBuilder("checkout_cart")
.setSpanKind(SpanKind.SERVER)
.setParentFrom(openTelemetry.getPropagators(), requestHeaders)
.startAndCall(() -> processCheckout(cartId));
```
## Exception handling
`ExtendedTracer` re-throws exceptions without modification. This means you can
catch exceptions around `ExtendedTracer` calls and handle them as you would without `ExtendedTracer`.
When an exception is encountered during an `ExtendedTracer` call, the span is marked as error and
the exception is recorded.
If you want to customize this behaviour, e.g. to only record the exception, because you are
able to recover from the error, you can call the overloaded method of `startAndCall` or
`startAndRun` that takes an exception handler:
```java
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.extension.incubator.trace.ExtendedTracer;
ExtendedTracer extendedTracer = ExtendedTracer.create(tracer);
String transactionId = extendedTracer.spanBuilder("checkout_cart")
.startAndCall(() -> processCheckout(cartId), Span::recordException);
```
See [ExtendedTraceApiUsageTest](./src/test/java/io/opentelemetry/api/incubator/trace/ExtendedTraceApiUsageTest.java).

View File

@ -12,8 +12,31 @@ otelJava.moduleName.set("io.opentelemetry.api.incubator")
dependencies {
api(project(":api:all"))
// Supports optional InstrumentationConfigUtil#convertToModel
compileOnly("com.fasterxml.jackson.core:jackson-databind")
annotationProcessor("com.google.auto.value:auto-value")
testImplementation("io.opentelemetry.semconv:opentelemetry-semconv:1.21.0-alpha")
// To use parsed config file as input for InstrumentationConfigUtilTest
testImplementation(project(":sdk-extensions:incubator"))
testImplementation(project(":sdk:testing"))
testImplementation(project(":api:testing-internal"))
testImplementation("io.opentelemetry.semconv:opentelemetry-semconv-incubating")
testImplementation("com.google.guava:guava")
}
testing {
suites {
register<JvmTestSuite>("testConvertToModel") {
dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation(project(":sdk-extensions:incubator"))
implementation(project(":sdk-extensions:autoconfigure"))
implementation("com.google.guava:guava")
}
}
}
}

View File

@ -0,0 +1,86 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.incubator.common;
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.api.internal.ImmutableKeyValuePairs;
import java.util.ArrayList;
import java.util.Comparator;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
@Immutable
final class ArrayBackedExtendedAttributes
extends ImmutableKeyValuePairs<ExtendedAttributeKey<?>, Object> implements ExtendedAttributes {
// We only compare the key name, not type, when constructing, to allow deduping keys with the
// same name but different type.
private static final Comparator<ExtendedAttributeKey<?>> KEY_COMPARATOR_FOR_CONSTRUCTION =
Comparator.comparing(ExtendedAttributeKey::getKey);
static final ExtendedAttributes EMPTY = ExtendedAttributes.builder().build();
@Nullable private Attributes attributes;
private ArrayBackedExtendedAttributes(
Object[] data, Comparator<ExtendedAttributeKey<?>> keyComparator) {
super(data, keyComparator);
}
/**
* Only use this constructor if you can guarantee that the data has been de-duped, sorted by key
* and contains no null values or null/empty keys.
*
* @param data the raw data
*/
ArrayBackedExtendedAttributes(Object[] data) {
super(data);
}
@Override
public ExtendedAttributesBuilder toBuilder() {
return new ArrayBackedExtendedAttributesBuilder(new ArrayList<>(data()));
}
@SuppressWarnings("unchecked")
@Override
@Nullable
public <T> T get(ExtendedAttributeKey<T> key) {
return (T) super.get(key);
}
@SuppressWarnings("unchecked")
@Override
public Attributes asAttributes() {
if (attributes == null) {
AttributesBuilder builder = Attributes.builder();
forEach(
(extendedAttributeKey, value) -> {
AttributeKey<Object> attributeKey =
(AttributeKey<Object>) extendedAttributeKey.asAttributeKey();
if (attributeKey != null) {
builder.put(attributeKey, value);
}
});
attributes = builder.build();
}
return attributes;
}
static ExtendedAttributes sortAndFilterToAttributes(Object... data) {
// null out any empty keys or keys with null values
// so they will then be removed by the sortAndFilter method.
for (int i = 0; i < data.length; i += 2) {
ExtendedAttributeKey<?> key = (ExtendedAttributeKey<?>) data[i];
if (key != null && key.getKey().isEmpty()) {
data[i] = null;
}
}
return new ArrayBackedExtendedAttributes(data, KEY_COMPARATOR_FOR_CONSTRUCTION);
}
}

Some files were not shown because too many files have changed in this diff Show More