-
Notifications
You must be signed in to change notification settings - Fork 328
Upgrade OTel SDK to 0.30.0 #7794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
157 commits
Select commit
Hold shift + click to select a range
c2ac121
update otel rust sdk and dependencies
meryl-c dcfe134
remove runtime interval type and modify `delay` function return type
meryl-c b26fcab
`Builder` and `TracerProvider` --> `SdkTracerProviderBuilder` and `Sd…
meryl-c 95c3233
update temporality import
meryl-c 8f342cb
update remaining usages of `Builder` to `SdkTracerProvderBuilder; rem…
meryl-c a42a3ca
use new builder for zipkin exporter (0.28.0)
meryl-c b17aafd
Update `new_exporter()` to new interface
meryl-c 1eadaf8
access tracer provider directly to shutdown (?)
meryl-c d920798
`metrics::Result` --> `error::OtelSdkResult` (otel sdk 0.30.0 and 0.2…
meryl-c 9e2767e
remove `GlobalMeterProvider` (otel 0.26.0)
meryl-c 306ebc7
In the process of removing `versioned_meter` everywhere, I ran into a…
meryl-c e464e40
remove `AggregationSelector`, `TemporalitySelecto`, `as_any()`
meryl-c 5205348
update `TraceResult` imports
meryl-c 76558e3
Use `SyncInstrument` instread of sync (not sure if these counters/gau…
meryl-c 132c9a0
`InstrumentationLibrary` --> `InstrumentationScope`
meryl-c 0472c75
Replace `MetricsError` with `MetricError` but this does not fix the b…
meryl-c ce8eb73
get rid of `opentelemetry_sdk::metrics::View` and replace with `Strea…
meryl-c 6505daa
Add `semconv_experimental` feature
meryl-c 008737e
`SdkTracerProviderBuilder` --> `TracerProviderBuilder`
meryl-c 155033b
`MetricError` --> `OTelSdkError`
meryl-c ac22b50
remove unused `Observer` import
meryl-c c872413
`opentelemetry_sdk::export::trace` --> `opentelemetry_sdk::trace`
meryl-c 4862847
`ExportResult` --> `OTelSdkResult`
meryl-c f5bda11
fix export method signatures
meryl-c 90b1ed9
add feature to use `Aggregation` enum
meryl-c 6f574c7
remove usages of `NoopMeterProvider` and import
meryl-c 965161b
Fix for non-exhaustive enums
meryl-c 5179116
change init to build for some instruments
meryl-c 7976a0f
various `SdkTracerProvider` fixes
meryl-c 53b43f2
add feature to otel sdk import
meryl-c 3903343
fix return types for `force_flush` and `shutdown`
meryl-c 3d7a4e9
remove 2nd arg from `BatchSpanProcessor::builder`
meryl-c a57c217
ZipkinExporterBuilder fixes
meryl-c 33f3bcb
`SpanExporterBuilder` API changes
meryl-c 02e7025
fix exporter return types
meryl-c 63696df
more otelsdkresult/error fixes
meryl-c d99a7c5
define resource on provider builder instead of config (because `with_…
meryl-c 4e0d0d5
replace `instrumentation_lib` with `instrumentation_scope`
meryl-c a745c89
add `..` since `KeyValue` is now non-exhaustive
meryl-c 7636ee8
Merge branch 'dev' into meryl_PULSR-1663
meryl-c ca869ae
MetricsExporter --> MetricExporter
meryl-c f2e2bb4
various `Resource` fixes
meryl-c 734efbe
more `KeyValue` fixes
meryl-c 5ac513c
metricexporterbuilder fix
meryl-c 9e24da5
with_metadata fix
meryl-c 71be73b
ran cargo update
meryl-c 64f0ea7
MeterProvider and MetricExporterBuilder fixes
meryl-c e536ee0
Use `build` to create instruments instead of `init`
meryl-c 2e960ad
`opentelemetry_sdk::trace::Config` only allows for default configurat…
meryl-c 1c67025
have gauges/counters call `record` instead of `observe` or `measure` …
meryl-c fa487f5
remove unused imports
meryl-c f4584bb
update metadatamap import
meryl-c 80ab12e
only pass 1 argument into `detect` implementation
meryl-c d89293f
fixes for function impls that have too many parameters
meryl-c d03bffc
more instrument/instrumentbuilder changes
meryl-c 88a7ee6
implement missing methods for classes that extend `SpanProcessor`
meryl-c 05575e6
remove usages of `opentelemetry::global::Error`
meryl-c 9009ac1
misc fixes, including InstrumentBuilder fixes
meryl-c 31f50e2
get rid of another usage of global Error
meryl-c 63f0dcf
patch otel-prometheus so that it uses otel_sdk 0.30.0
meryl-c 808aaeb
fix usages of Resource::builder and Resource::new, fix some type erro…
meryl-c 3d07518
fix macros
meryl-c 58af458
stop calling `shutdown()` on tracer provider since it does not have t…
meryl-c 02c8253
pass closure instead of stream builder into `with_view` usages
meryl-c 810b31f
fix lifecycle errors
meryl-c 5db1140
fix "`T` cannot be sent between threads safely" errors
meryl-c 0a1b842
remove unused imports
meryl-c 3aca3ac
fix issues in aggregation.rs
meryl-c 4164232
fix errors in datadog exporter (but it is probably getting deleted)
meryl-c b311df4
`SpanExporter` no longer uses a mutable in its `export` method so upd…
meryl-c 7291f83
Remove apollo implementation of datadog-exporter and use the upstream…
meryl-c 783825a
upgrade tonic
meryl-c 1cf31b8
fix last warnings
meryl-c d365994
Merge branch 'dev' into meryl_PULSR-1663
meryl-c f05a6df
part 1 of fixing errors uncovered by `cargo xtask test`
meryl-c 7d91791
Merge branch 'dev' into meryl_PULSR-1663
meryl-c 62bb645
fixes post-merge
meryl-c f537e34
part one of restoring user configurations: exponential histograms
meryl-c 61e8a0b
replace `meter` with `meter_with_scope`
meryl-c fe39e48
remove tests for deleted method
meryl-c 8af6d82
fix tests in metrics/aggregation
meryl-c 7befe00
use default SpanExporter in test
meryl-c 3a3a5e9
Restore configuration for http exporter, add comment explaining how t…
meryl-c c5d401b
restore `TonicExporterBuilder` configuration
meryl-c 6afca68
set endpoint and protocol on httpexporterbuilder
meryl-c dcb68be
replace `TracerProvider` methods that have been removed
meryl-c bd374dd
build resource instead of using `Default::default()`
meryl-c 5352b72
remove unused `error_map`(s)
meryl-c eb4e26a
Fix `versioned_meter` calls in tests, fix all tests in `apollo-router…
meryl-c afc0c97
add error handling, following instructions: https://github.com/open-t…
meryl-c 2c26646
annotate flatmaps with types
meryl-c 78cffb8
Fix remaining test build errors
rregitsky 99efe16
lint fixes
rregitsky 472ac79
more lint
rregitsky a23bdcb
Merge remote-tracking branch 'origin/dev' into meryl_PULSR-1663
rregitsky b3b18ba
Fix error_handler merge
rregitsky 0e729ed
fix up the rest of the merge conflicts
rregitsky c87b07d
test build fixes
rregitsky d720436
fix some linting
rregitsky 8e153fa
fix most remaining lint issues
rregitsky 53b1f2d
Merge remote-tracking branch 'origin/dev' into meryl_PULSR-1663
rregitsky 493d046
WIP attempt to fix observable instruments
rregitsky a115214
wip continued
rregitsky d6cac60
Use delegate for filter meter provider meter_with_scope
rregitsky 1a35e00
remove unnecessary keep-alive stuff
rregitsky 1abb387
lint
rregitsky 2d55b39
Merge remote-tracking branch 'origin/dev' into meryl_PULSR-1663
rregitsky 2a81a33
Fix generic array build warnings
rregitsky 9ddfa1a
Fix equal_attributes now that input is not sorted
rregitsky 81e8c0d
Fix filtered meter provider tests
rregitsky 0dd2b6f
Fix test_metrics() loop metric overlap
rregitsky 1fafa50
Use with_metrics() for test_job_watcher()
rregitsky 6498150
Re-add global to aggregate and filter. Fix global test
rregitsky 9f6be11
update snapshot after rename config removal
rregitsky 61cc1cf
Make single-threaded tests use global meter provider with leaked memory
rregitsky 4499b56
Remove observable gauge drop tests
rregitsky 0847e87
Better explanation about sdkmeterproviderinner drop comment
rregitsky 660bcc9
Go back to thread_local, but keep leaking meter provider
rregitsky f668a7d
Revert changes to rename. Allow rename to change instrument name with…
rregitsky 77eecf2
fed query typenames snapshot update. Adds otel info logs
rregitsky 820c9a8
Move error_handler replacement, new logging layer, from telemetry plu…
rregitsky 6ac40db
lint
rregitsky ba5af7f
Merge remote-tracking branch 'origin/dev' into meryl_PULSR-1663
rregitsky 5cfa9a3
Fix cache metric merge conflict. Simpify MetricView TryInto.
rregitsky 2dda8e2
Re-add accidentally deleted response cache metric
rregitsky 6591a54
Recreate error_handler logic as tracing layer
rregitsky fdfbd08
lint fixes
rregitsky f159d95
Recreate prometheus aggregations + test snapshots
rregitsky 2cf9717
Only apply global hist buckets to instr w/ no custom view configured
rregitsky eda25cf
Remove globals from aggregation tests
rregitsky 5e67607
remove duplicate attr in test_custom_router_instruments_with_requirem…
rregitsky 48563e5
Loosen equal_attributes to account for dupe attrs from response events
rregitsky 8b5ea18
Filter fed_query_w_typnames logs to WARN
rregitsky bb53a91
Remove noisy OTel logs from testing trace subscriber
rregitsky 18ed926
Readd runtime for batch processor. Move span/metric exporters back to…
rregitsky 1461d1d
remove debug log
rregitsky 742198b
Update snapshots with new resource attrs
rregitsky 6a2f5c1
lint fixes
rregitsky 9fe8d63
Merge remote-tracking branch 'origin/dev' into meryl_PULSR-1663
rregitsky 9343d9e
only apply aggregations to histograms
rregitsky abb808b
enable otlp for integration tests which need no error logs
rregitsky bb7966a
Re-add router DD tracing common conversion to OTEL tracing common
rregitsky cdd87e5
Fix missing parent_based sampler set
rregitsky 4287518
Add noop reader to default aggregate meter provider inners. Revert ad…
rregitsky a2c1dee
process_endpoint default/empty to None to account for bug
rregitsky b79123e
Merge remote-tracking branch 'origin/dev' into meryl_PULSR-1663
rregitsky b841504
Filter prometheus histogram aggregation to only histogram instruments
rregitsky 9065e5e
Add tracing layer for otel reemit. Move otel layers to separate mod.
rregitsky 80912cf
replace remaining perodic reader builders with runtime
rregitsky fb03cc0
Accept meterprovider drop logs for lifecycle clie tests
rregitsky 49d7f6d
Parity for otel error layer and reemit layer fields
rregitsky ee093ec
strip otel shutdown logs from lifecycle tests. Fix otel_layers error …
rregitsky 83bc041
Remove unnecessary otlp config from test
rregitsky 8a88469
Move common buckets view into reload/metrics.rs::configure_views()
rregitsky 7c4aca9
Wrap configure_views in exporter enabled check. Rename to configure_p…
rregitsky d61ce0d
Re-add and fix DD agent sampler (WIP)
rregitsky d4cde2d
Fix client PSR default for Datadog tests
rregitsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
1 change: 1 addition & 0 deletions
1
...uter/src/compute_job/snapshots/apollo_router__compute_job__tests__observability@logs.snap
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
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
1 change: 1 addition & 0 deletions
1
...r/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -441,7 +441,6 @@ impl Executable { | |
| if apollo_telemetry_initialized { | ||
| // We should be good to shutdown OpenTelemetry now as the router should have finished everything. | ||
| tokio::task::spawn_blocking(move || { | ||
| opentelemetry::global::shutdown_tracer_provider(); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't have access to a tracer provider here, so I don't know how to follow these migration instructions: open-telemetry/opentelemetry-rust#2369 |
||
| meter_provider_internal().shutdown(); | ||
| }) | ||
| .await?; | ||
|
|
||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
tonicdependency in apollo-router is just to create instances of structures for use with opentelemetry-otlp. In new versions of opentelemetry-otlp, everything we need is reexported here: https://docs.rs/opentelemetry-otlp/0.30.0/opentelemetry_otlp/tonic_types/index.htmlSo we can remove our
tonicdependency and replace our tonic imports withuse opentelemetry_otlp::tonic_types::{etc}.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goto-bus-stop @BrynCooke it doesn't export
MetadataValue, which we do use:router/apollo-router/src/plugins/telemetry/apollo_otlp_exporter.rs
Line 72 in f14d7b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up upgrading tonic to 0.13.1 to fix another issue. if there's a workaround to using
MetadataValue, I'm happy to do that instead and remove tonic