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

fix(datadog): only http.route for resource #810

Merged

Conversation

majorgreys
Copy link
Contributor

Address an inconsistency with the the semantic conventions for HTTP the Datadog exporter uses to specify the HTTP route.

@majorgreys majorgreys requested a review from a team June 11, 2020 02:12
Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

Approved, but a quick caveat:

I was thinking through our discussion earlier and I wonder if http.target should be the fall-back?

Since every individual resource in datadog becomes it's own line in APM, I worry that you'll end up with some giant page of thousands (or millions) of resource links because you're using the target.

If this is how DD normally handles it, great. But in the OT world we explicitly call out that the default if "route" is not available for span name is just the HTTP method, since the cardinality is small:

https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/http.md#name

@@ -222,8 +222,8 @@ def test_export(self):
def test_resources(self):
test_attributes = [
{},
{"http.method": "GET", "http.route": "/foo"},
{"http.method": "GET", "http.path": "/foo"},
{"http.method": "GET", "http.route": "/foo/<int:id>"},
Copy link
Member

Choose a reason for hiding this comment

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

might be good to add a test case with both http.route and http.target (a common scenario) and ensure that the precedence is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with the conservative approach you suggested, not backing off to http.target, being that it would create a cardinality issue.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

👍

@toumorokoshi
Copy link
Member

@majorgreys can you take a look at comments? then we can merge.

@codeboten codeboten merged commit e35d84f into open-telemetry:master Jun 17, 2020
@majorgreys majorgreys deleted the majorgreys/datadog-resource-target branch June 17, 2020 04:35
@majorgreys majorgreys changed the title fix(datadog): use http.target not http.path fix(datadog): only http.route for resource Jun 17, 2020
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 2020
…ry#810)

* docs: add example for express plugin open-telemetry#800

* chore: add link to express example in plugin's readme

* chore: addres PR's comments
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 2020
…ry#810)

* docs: add example for express plugin open-telemetry#800

* chore: add link to express example in plugin's readme

* chore: addres PR's comments
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.

3 participants