hypertrace / javaagent

Hypertrace OpenTelemetry Java agent with payload/body and headers data capture.
Apache License 2.0
30 stars 15 forks source link

✨ Expose reporting config to consumers of `javaagent-core` so that `Filter` implementation authors can access them #327

Closed ryandens closed 3 years ago

ryandens commented 3 years ago

Description

Allow the HypertraceConfig APIs around reporting and OPA configuration to be exposed to clients following a similar pattern as done with the InstrumentationConfig. PR #322 moved the config implementation out of the javaagent-core package, but some implementations of the Hypertrace Filter API need to access config properties that are not accessible via the InstrumentationConfig object. As this is a public API, I wanted to make it well known that the ReportingConfig.Opa object isn't going to live forever in this repo, as we'd like to eventually remove configuraton options that are intended for use by Traceable to not be included in the Hypertrace repo.

Testing

Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.

Checklist:

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

N/A

ryandens commented 3 years ago

@pavolloffay I know you have lots of context and perspective on this (re: #322 ) let me know if you have any concerns/feedback!

pavolloffay commented 3 years ago

Yeah this PR should not be needed as the https://github.com/hypertrace/javaagent/blob/main/otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/config/HypertraceConfig.java is available when the filter is created.