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

Better packaging for creating custom span decorators #573

Open
ehmke opened this issue May 11, 2020 · 3 comments
Open

Better packaging for creating custom span decorators #573

ehmke opened this issue May 11, 2020 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@ehmke
Copy link

ehmke commented May 11, 2020

Hi, several rules provide extendable span decorator interfaces. Is there a way to easily import them without depending on the whole specialagent project (not sure if that works) or copying the interfaces to my custom project? What is the strategy behind it?

@ehmke
Copy link
Author

ehmke commented May 12, 2020

Also from usability POV I would find it better to have the option to skip creation of spans in the same place where I define how spans are sent. Right now, I can only skip servlet spans or I would need to use the rewrite functionality.

@safris
Copy link
Collaborator

safris commented May 12, 2020

Hi @ehmke, if I understand your first question correctly, you want to use integrations (that have support for custom span decorators) with manual instrumentation? i.e. without SpecialAgent being attached to the application? All of the integrations that implement custom span decorators in SpecialAgent are part of the SpecialAgent's codebase. Therefore, there is no easy way to use these integrations in a manual way (let alone the custom span decorators part). There is an outstanding PR regarding extensibility of the custom span decorator pattern to all integrations.

With regard to your second question: The Rewritable Tracer is the only mechanism capable of overriding the behavior of span creation in integrations. The Rewritable Tracer applies to all integrations, so you should be able to achieve what you desire with a rules JSON config.

@safris safris self-assigned this May 12, 2020
@safris safris added the question Further information is requested label May 12, 2020
@ehmke
Copy link
Author

ehmke commented May 12, 2020

Hey, no I actually meant the usage of decorators with specialagent. Currently, the decorator interfaces are packed into specialagent's main jar. Maybe they could be moved to an -api jar.

The PR your mentioned looks quite promising!
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants