Skip to content

Add new integration for Servlet Filters, HttpServlet, and RequestDispatcher#1050

Merged
tylerbenson merged 1 commit into
masterfrom
tyler/servlet-depth
Oct 28, 2019
Merged

Add new integration for Servlet Filters, HttpServlet, and RequestDispatcher#1050
tylerbenson merged 1 commit into
masterfrom
tyler/servlet-depth

Conversation

@tylerbenson
Copy link
Copy Markdown
Contributor

@tylerbenson tylerbenson commented Oct 19, 2019

Disabled by default, and only creates a span if existing trace detected.

To enable all of them:

  • System Property: -Ddd.integration.servlet.enabled=true
  • Environment Variable: DD_INTEGRATION_SERVLET_ENABLED=true

(They have independent configs as well. If needed, view the source below.)

@tylerbenson tylerbenson requested a review from a team as a code owner October 19, 2019 00:12
@tylerbenson tylerbenson force-pushed the tyler/servlet-depth branch 4 times, most recently from 886da9e to c2e2961 Compare October 25, 2019 20:32
@tylerbenson tylerbenson changed the title Add new integration for Servlet Filters and HttpServlet Add new integration for Servlet Filters, HttpServlet, and RequestDispatcher Oct 25, 2019
…atcher

Disabled by default, and only creates a span if existing trace detected.

To enable all of them:
* System Property: `-Ddd.integration.servlet.enabled=true`
* Environment Variable: `DD_INTEGRATION_SERVLET_ENABLED=true`

(They have independent configs as well.  If needed, view the source below.)
Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a couple small comments, but overall, it looks fine to me.
However, I don't feel that I understand the contextStore or AgentPropagation well-enough to say for certain.

import datadog.trace.agent.decorator.BaseDecorator;

public class HttpServletResponseDecorator extends BaseDecorator {
public static final HttpServletResponseDecorator DECORATE = new HttpServletResponseDecorator();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private constructor?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is primarily an optimization to avoid creating numerous objects. That it's a singleton is just a side-effect.

Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a bit more background in separate conversation, looks good to me.

@tylerbenson tylerbenson merged commit a903f20 into master Oct 28, 2019
@tylerbenson tylerbenson deleted the tyler/servlet-depth branch October 28, 2019 15:40
@tylerbenson tylerbenson added this to the 0.36.0 milestone Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants