Repository navigation
Conversation
abelonogov-ld
left a comment
There was a problem hiding this comment.
Most files could be used, but client sdk semantics was transfered to server code, especially when multithreading occurs
Keep the new Java observability package in release-please alongside the Flutter package added on main. Co-authored-by: Vadim Korolik <vkorolik@launchdarkly.com>
Cache the sampling query, synchronize provider startup, keep sampling config across manual start, and attach launchdarkly.sampling.ratio on exported spans. Replace the Kotlin Gradle scripts with Groovy and drop the committed Gradle cache. Co-authored-by: Vadim Korolik <vkorolik@launchdarkly.com>
|
Addressed the review on client-SDK semantics in server code. Provider startup is single-threaded ( |
The license link is the public Apache documentation endpoint, so it does not need to stay on plain HTTP. Co-authored-by: Vadim Korolik <vkorolik@launchdarkly.com>
Pre-init LDObserve calls use a local no-op and no longer install GlobalOpenTelemetry, so TracingHook still exports after init. Sampling patterns are length-capped, allowlisted, and rejected when they can ReDoS. Exclude the Java SDK from the Yarn path filter. Co-authored-by: Vadim Korolik <vkorolik@launchdarkly.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f39b4b2. Configure here.
Closing an inner group now marks its parent, so ((a+))+ is dropped the same way as (a+)+ and is not compiled on the export path. Co-authored-by: Vadim Korolik <vkorolik@launchdarkly.com>
The e2e app starts a local collector, registers ObservabilityPlugin, and exits non-zero unless the flag span, a kept span, and a dropped span arrive after a pre-init LDObserve call. Co-authored-by: Vadim Korolik <vkorolik@launchdarkly.com>
|
The public API needs opentelemetry-api, but the POM publishes it as runtime, recordLog will not compile in some when used. The e2e example hides this by declaring opentelemetry-api explicitly, and the README doesn't mention it. Fix: declare opentelemetry-api as api. |
|
Android moved forward and this version depends on many month behind Android code. Proxy and custom HTTP settings are ignored. GraphQLClient uses a bare HttpURLConnection, and the OTLP exporters don't take headers or a proxy. Android already exposes customHeaders. Servers behind egress proxies will fail to fetch sampling config and to export. |
|
ObservabilityOptions has no resourceAttributes, no log-level threshold, no enabled flag |
| * the cached string, so a server process does not re-read the query for | ||
| * every request or every client.</p> | ||
| */ | ||
| public static String loadQuery(String resourcePath) { |
There was a problem hiding this comment.
I would prefer compile-timed strings here. Go, .NET, Android, Node already use them
There was a problem hiding this comment.
Server packaging is where resources go missing. Shaded jars with minimize(), ProGuard, and some app-server or OSGi classloaders can drop or hide non-class files. Plain jars and Spring Boot fat jars are fine, but a library shouldn't depend on that.
|
okhttp, okio and the Kotlin stdlib leak unshaded. The default OTLP exporter brings okhttp 4.12, okio 3.6 and kotlin-stdlib 1.9.10. The LaunchDarkly server SDK itself shades its Kotlin and gson (com/launchdarkly/shaded/kotlin/... in its jar) precisely so server apps don't get version clashes. This plugin undoes that. The fix is cheap: OTel ships opentelemetry-exporter-sender-jdk, which uses Java 11's built-in HttpClient, and this module already targets Java 11. |
|
The artifact name is ambiguous. The Android artifact is also a Java library, and LaunchDarkly's Java server family uses launchdarkly-java-server-sdk-* (-otel, -redis-store). Something with "server" in it would be clearer. Decide before the first publish, because Maven coordinates are permanent. |
|
We need server CI configuration, many of above issues would be caught if we have one |
|
Server e2e app wasn't provided. |

Summary
Add new Java O11y plugin.
How did you test this change?
ci
Are there any deployment considerations?
Note
Overview
Introduces
launchdarkly-observability-java(0.1.0) as a new Gradle library undersdk/@launchdarkly/observability-java: an early-access LaunchDarkly Server SDK plugin that wires OpenTelemetry traces/logs/metrics to OTLP, registersTracingHookfor flag-evaluation spans, and loads backend sampling rules via GraphQL (CustomSampler, export-time span/log filtering, child-span dropping, bounded regex handling).Public surface includes
ObservabilityPlugin,ObservabilityOptions, andLDObserve(safe no-op before init; avoids lockingGlobalOpenTelemetryonto noop).OtelManagerowns provider lifecycle, flush/shutdown, and optional manual start.CI & release: dedicated workflows
java-observability.yml(./gradlew :lib:build) andjava-plugin-e2e.yml;turbo.ymlpath filters exclude the Java SDK ande2e/java-pluginfrom the Yarn monorepo job. Release Please registers the new component (gradle.properties).e2e/java-pluginis a runnable Gradle app (composite build against:lib) that mocks OTLP/sampling and asserts flag spans, sampling keep/drop, sampling-ratio attributes, and pre-init behavior.Reviewed by Cursor Bugbot for commit f57eeaf. Bugbot is set up for automated code reviews on this repo. Configure here.