obelix74 commented on code in PR #3468:
URL: https://github.com/apache/polaris/pull/3468#discussion_r2706390458


##########
runtime/service/src/main/java/org/apache/polaris/service/reporting/PolarisMetricsReporter.java:
##########
@@ -32,23 +32,30 @@
  * <p>The implementation to use is selected via the {@code 
polaris.iceberg-metrics.reporting.type}
  * configuration property, which defaults to {@code "default"}.
  *
- * <p>Custom implementations that need access to request-scoped context (such 
as realm information
- * or principal details) should inject the appropriate CDI beans (e.g., {@code 
RealmContext}, {@code
- * PolarisPrincipalHolder}) rather than expecting this data to be passed as 
parameters.
+ * <p>Custom implementations that need access to request-scoped context should 
inject the
+ * appropriate CDI beans rather than expecting this data to be passed as 
parameters:
  *
- * <p>Example implementation:
+ * <ul>
+ *   <li>{@code RealmContext} - for realm/tenant information
+ *   <li>{@code io.opentelemetry.api.trace.SpanContext} - for OpenTelemetry 
trace/span IDs
+ *   <li>{@code PolarisPrincipalHolder} - for authenticated principal 
information
+ * </ul>
+ *
+ * <p>Example implementation with OpenTelemetry correlation:
  *
  * <pre>{@code
  * @ApplicationScoped
  * @Identifier("custom")
  * public class CustomMetricsReporter implements PolarisMetricsReporter {
  *
  *   @Inject RealmContext realmContext;
+ *   @Inject SpanContext spanContext;

Review Comment:
   This is the one CDI that is currently missing.  Without this, all users have 
to do `Span.current().getSpanContext()`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to