-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add support for OpenTelemetry in Glue metastore #18458
Conversation
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.
Lgtm % guice provider
...-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueOpenTelemetryRequestHandler.java
Outdated
Show resolved
Hide resolved
593fe9b
to
718b296
Compare
install(conditionalModule( | ||
IcebergGlueCatalogConfig.class, | ||
IcebergGlueCatalogConfig::isSkipArchive, | ||
config -> requestHandlers.addBinding().toInstance(new SkipArchiveRequestHandler()))); |
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.
config
is of typeBinder
. rename the parameter- i don't think one module should add to set binder created by another module; is it guaranteed to work?
- repeat
newSetBinder(binder, RequestHandler2.class)
inside the conditional module
- repeat
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.
Sent follow-up #18465
Multibinder javadoc mentions:
Contributing multibindings from different modules is supported. For example, it is okay for both CandyModule and ChipsModule to create their own Multibinder, and to each contribute bindings to the set of snacks. When that set is injected, it will contain elements from both modules.
https://google.github.io/guice/api-docs/7.0.0/javadoc/com/google/inject/multibindings/Multibinder.html
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 quoted text says that 2+ modules can call newSetBinder(binder, X.class)
and this will end-up being one Set<X>
.
it does not seem to say, however, that newSetBinder(binder, X.class)
result (the Multibinder
object) can be shared between modules
install(conditionalModule( | ||
IcebergGlueCatalogConfig.class, | ||
IcebergGlueCatalogConfig::isSkipArchive, | ||
config -> requestHandlers.addBinding().toInstance(new SkipArchiveRequestHandler()))); |
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.
same as 9698991#r1279088778
public RequestHandler2 createRequestHandler(OpenTelemetry openTelemetry) | ||
{ | ||
return AwsSdkTelemetry.builder(openTelemetry) | ||
.setCaptureExperimentalSpanAttributes(true) |
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.
nice!
Can we add similar for Iceberg Glue catalog?
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.
This PR added support for Iceberg Glue catalog as well. The above screenshot is captured with Iceberg connector. GlueMetastoreModule
is installed in IcebergGlueCatalogModule
.
Description
Extracted from #18368
Release notes
(x) This is not user-visible or docs only and no release notes are required.