-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Pass OpenTelemetry to SystemAccessControl #18899
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,11 +13,27 @@ | |||||||||||||||||||
| */ | ||||||||||||||||||||
| package io.trino.spi.security; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| import io.opentelemetry.api.OpenTelemetry; | ||||||||||||||||||||
| import io.opentelemetry.api.trace.Tracer; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| import java.util.Map; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| public interface SystemAccessControlFactory | ||||||||||||||||||||
| { | ||||||||||||||||||||
| String getName(); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| @Deprecated | ||||||||||||||||||||
| SystemAccessControl create(Map<String, String> config); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| default SystemAccessControl create(Map<String, String> config, SystemAccessControlContext context) | ||||||||||||||||||||
| { | ||||||||||||||||||||
| return create(config); | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| interface SystemAccessControlContext | ||||||||||||||||||||
| { | ||||||||||||||||||||
| OpenTelemetry getOpenTelemetry(); | ||||||||||||||||||||
|
Member
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. Why do you need an instance of OpenTelemetry? Generally, all you need is a properly configured Tracer.
Member
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. I didn't see how access control needs would be different than those of a connector. I followed trino/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorContext.java Lines 31 to 39 in bda3510
Member
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. I couldn't find any authoritative docs or code comments, thus may be drawing wrong conclusions, but both are expected here |
||||||||||||||||||||
|
|
||||||||||||||||||||
| Tracer getTracer(); | ||||||||||||||||||||
| } | ||||||||||||||||||||
| } | ||||||||||||||||||||
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.
nit: verify that systemAccessControlName is not empty or null
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 is verified by the caller within the class and the method is private
also, empty string is currently valid factory name :)