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

[dd-trace-ot] Ability to customize LogHandler when using the java agent #6474

Open
ghostdogpr opened this issue Jan 12, 2024 · 0 comments
Open
Labels
comp: opentracing OpenTracing inst: others All other instrumentations

Comments

@ghostdogpr
Copy link

I would like to customize the logic of extractError in DefaultLogHandler:

if (map.get(ERROR_OBJECT) instanceof Throwable) {

For that, I can simply create my own custom LogHandler and then create a new DDTracer:

val ddTracer = DDTracer.builder().logHandler(new CustomLogHandler()).build()

But when I do that it fails with: Datadog Tracer already installed by dd-java-agent. NOTE: Manually creating the tracer while using dd-java-agent is not supported.

Is there a way to pass a custom LogHandler when using the agent?

@PerfectSlayer PerfectSlayer added comp: opentracing OpenTracing inst: others All other instrumentations labels Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: opentracing OpenTracing inst: others All other instrumentations
Projects
None yet
Development

No branches or pull requests

2 participants