Repository navigation
spec: metrics hand off from JS to native, as spans do - #34
Merged
Merged
Conversation
JS metrics use stock sdk-metrics and export from JS on every platform; native metrics use the native SDK and RNOtel.meter. Both read exportConfig.metrics, and native hands JS its resource and merged metrics config through the initialize result. Nothing crosses the seam per measurement. Also replaces exportConfig.url with one URL per signal (traces, metrics) and shared plus per-signal headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open
JS aggregates with stock sdk-metrics and hands its points to native through exportMetrics; native exports JS and native metrics with one OtlpHttpMetricExporter under its own resource, URL and headers. JS no longer needs the resource or metrics config, so SeamInitResult is unchanged. Android builds MetricData from otel-java's public factories. iOS uses a fork of opentelemetry-swift-core 2.6.0 that makes the metric data constructors public (access levels only). Metrics are cumulative only; temporalityPreference is dropped until asked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design only; nothing is implemented. Metrics are built separately after v0 and don't block 0.3.0.
What changes in the spec
exportConfig.urlis replaced by one URL per signal:exportConfig: { headers, traces: { url, headers }, metrics: { url, headers } }.sdk-metrics. On mobile ourHandOffMetricExporterpasses the points to native through a newexportMetrics(SeamMetric[])call, once per export interval (60 s) or flush. Web keeps the stockOTLPMetricExporter.MeterProviderwithPeriodicMetricReaderin each native core, used throughRNOtel.meter. OneOtlpHttpMetricExporterexports both JS and native metrics, with native's resource, URL and headers.SeamInitResultis unchanged. JS never holds the resource, URL or headers.JsMetricData, built likeJsSpanData, with otel-java's public point and data factories.internalupstream.Codabledecoder./v1/metricsroute on the fake collector<name>.metrics.otlp.jsonexpected file per scenario; a scenario without one must export no metricsmetrics-js,metrics-native,metrics-headers,metrics-off, andbackground-flushextended to native metricsOpen questions (§4.6.9)
service.instance.idper process start for fleet identity, or should we only document it?🤖 Generated with Claude Code