Skip to content
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

Merged
merged 2 commits into from
Jul 31, 2023
Merged

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Jul 29, 2023

Description

Extracted from #18368

Screenshot 2023-07-29 at 11 20 24

Release notes

(x) This is not user-visible or docs only and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label Jul 29, 2023
@github-actions github-actions bot added tests:hive iceberg Iceberg connector delta-lake Delta Lake connector hive Hive connector labels Jul 29, 2023
@ebyhr ebyhr requested review from wendigo, findepi and hashhar July 29, 2023 07:50
Copy link
Contributor

@wendigo wendigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm % guice provider

@ebyhr ebyhr force-pushed the ebi/glue-opentelemetry-v2 branch from 593fe9b to 718b296 Compare July 31, 2023 00:58
@ebyhr ebyhr merged commit c7611dd into master Jul 31, 2023
@ebyhr ebyhr deleted the ebi/glue-opentelemetry-v2 branch July 31, 2023 03:41
@github-actions github-actions bot added this to the 423 milestone Jul 31, 2023
install(conditionalModule(
IcebergGlueCatalogConfig.class,
IcebergGlueCatalogConfig::isSkipArchive,
config -> requestHandlers.addBinding().toInstance(new SkipArchiveRequestHandler())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • config is of type Binder. 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

Copy link
Member Author

@ebyhr ebyhr Jul 31, 2023

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

Copy link
Member

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())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public RequestHandler2 createRequestHandler(OpenTelemetry openTelemetry)
{
return AwsSdkTelemetry.builder(openTelemetry)
.setCaptureExperimentalSpanAttributes(true)
Copy link
Member

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?

Copy link
Member Author

@ebyhr ebyhr Jul 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed delta-lake Delta Lake connector hive Hive connector iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

3 participants