Skip to content

feedback - #2

Open
jack-berg wants to merge 1 commit into
jhalliday:jh-profiling-vfrom
jack-berg:jh-profiling-v-feedback
Open

jack-berg wants to merge 1 commit into
jhalliday:jh-profiling-vfrom
jack-berg:jh-profiling-v-feedback

Conversation

@jack-berg

Copy link
Copy Markdown

Issuing feedback for open-telemetry#8718 in the form of a patch.

  • Register the listener via AutoConfigurationCustomizerProvider (and a parallel DeclarativeConfigurationCustomizerProvider). Standalone AutoConfigureListener SPI registration never fires — SpiHelper only piggybacks the listener set while loading other SPIs.
  • Factory reflection used getConstructors()[0], which returns no entries for the package-private PanamaProcessContextPublisher. Switched to a package-private static create() + getDeclaredMethod.
  • MADV_DONTFORK = 0x10 is MADV_DONTDUMP. Correct value is 10.
  • clock.now() → clock.nanoTime(); the field is monotonic_published_at_ns.
  • No-op short-circuit in publishUpdate when nanoTime() hasn't advanced. Any "update" <1ns apart isn't meaningful and would be invisible to readers using the seqlock protocol.
  • Integer.parseInt(java.specification.version) threw NumberFormatException on Java 8 ("1.8"), permanently poisoning the factory singleton.
  • Factory caught ReflectiveOperationException only. Broadened to also catch LinkageError so native-init failures (e.g. --illegal-native-access=deny) degrade to noop.
  • publishFirstTime now commits mutable state only after all steps succeed and rolls back native resources on failure.
  • close() writes 0 to the timestamp and issues a fullFence() before munmap, giving in-flight readers the spec-defined signal to retry instead of a SIGSEGV window.
  • ProcessContextPublisher.publish / close throw IOException instead of Throwable.
  • Added ProcessContextPublisher.getInstance(); made the factory package-private.
  • Factored ProcessContextData / SdkProcessContextData following SdkLogRecordData pattern. Moved SPI implementations and the data class into .internal.
  • Read the feature flag via ConfigUtil.getString so the env-var form works.
  • Replaced synchronized methods with a dedicated lock object with @GuardedBy annotations.
  • Logger call was passing the exception message as a format parameter; now passes the Throwable so the stack trace is preserved.
  • JvmTestSuite for java25Test so the Java-25 tests actually run (fixes the author's open gradle question). Default ./gradlew check runs the OS/JDK-agnostic tests.
  • Module name corrected to io.opentelemetry.sdk.processcontext.
  • Dropped otel.animalsniffer-conventions (incompatible with JDK 25).
  • OSGi osgiServiceLoaderProvides / osgiOptionalPackages updated for the new SPIs.
  • @EnabledOnOs(OS.LINUX) on tests that touch /proc/<pid>/maps or the Panama syscalls.
  • api(":sdk:all") replacing the :sdk:common + :sdk:all split.
  • compileOnly(":sdk-extensions:declarative-config") — the declarative-config SPI shouldn't be forced on autoconfigure-only consumers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant