Skip to content

Commit

Permalink
Span name updated to follow semantic conventions to reduce cardinality (
Browse files Browse the repository at this point in the history
  • Loading branch information
alrex authored Aug 18, 2020
1 parent a43d088 commit c9a0fe7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

- Updating span name to match semantic conventions
([#972](https://github.com/open-telemetry/opentelemetry-python/pull/972))

## Version 0.12b0

Released 2020-08-14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def on_request_start(
):
http_method = params.method.upper()
if trace_config_ctx.span_name is None:
request_span_name = http_method
request_span_name = "HTTP {}".format(http_method)
elif callable(trace_config_ctx.span_name):
request_span_name = str(trace_config_ctx.span_name(params))
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_status_codes(self):
self.assert_spans(
[
(
"GET",
"HTTP GET",
(span_status, None),
{
"component": "http",
Expand Down Expand Up @@ -192,7 +192,7 @@ def strip_query_params(url: yarl.URL) -> str:
self.assert_spans(
[
(
"GET",
"HTTP GET",
(StatusCanonicalCode.OK, None),
{
"component": "http",
Expand Down Expand Up @@ -232,7 +232,7 @@ async def do_request(url):
self.assert_spans(
[
(
"GET",
"HTTP GET",
(expected_status, None),
{
"component": "http",
Expand Down Expand Up @@ -260,7 +260,7 @@ async def request_handler(request):
self.assert_spans(
[
(
"GET",
"HTTP GET",
(StatusCanonicalCode.DEADLINE_EXCEEDED, None),
{
"component": "http",
Expand Down Expand Up @@ -290,7 +290,7 @@ async def request_handler(request):
self.assert_spans(
[
(
"GET",
"HTTP GET",
(StatusCanonicalCode.DEADLINE_EXCEEDED, None),
{
"component": "http",
Expand Down

0 comments on commit c9a0fe7

Please sign in to comment.