Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/instana/instrumentation/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def __init__(self, app: "ExceptionMiddleware") -> None:

def _collect_kvs(self, scope: Dict[str, Any], span: "InstanaSpan") -> None:
try:
span.set_attribute("span.kind", SpanKind.SERVER)
span.set_attribute("http.path", scope.get("path"))
span.set_attribute(SpanAttributes.HTTP_METHOD, scope.get("method"))

Expand Down
2 changes: 0 additions & 2 deletions src/instana/instrumentation/pep0249.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def _collect_kvs(
sql: str,
) -> None:
try:
span.set_attribute("span.kind", SpanKind.CLIENT)

db_parameter_name = next(
(
p
Expand Down
1 change: 0 additions & 1 deletion src/instana/instrumentation/pyramid.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def __call__(self, request: "Request") -> "Response":
ctx = tracer.extract(Format.HTTP_HEADERS, dict(request.headers))

with tracer.start_as_current_span("wsgi", span_context=ctx) as span:
span.set_attribute("span.kind", SpanKind.SERVER)
span.set_attribute("http.host", request.host)
span.set_attribute(SpanAttributes.HTTP_METHOD, request.method)
span.set_attribute(SpanAttributes.HTTP_URL, request.path)
Expand Down
1 change: 0 additions & 1 deletion src/instana/instrumentation/sanic_inst.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def request_with_instana(request: Request) -> None:
token = context.attach(ctx)
request.ctx.token = token

span.set_attribute("span.kind", SpanKind.SERVER)
span.set_attribute("http.path", request.path)
span.set_attribute(SpanAttributes.HTTP_METHOD, request.method)
span.set_attribute(SpanAttributes.HTTP_HOST, request.host)
Expand Down
4 changes: 2 additions & 2 deletions src/instana/span/registered_span.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def __init__(self, span, source, service_name, **kwargs) -> None:
if "gcps" in span.name:
self.n = "gcps"

# Store any leftover attributes in the custom section
# Logic to store custom attributes for registered spans (not used yet)
if len(span.attributes) > 0:
self.data["custom"]["attributes"] = self._validate_attributes(
self.data["sdk"]["custom"]["tags"] = self._validate_attributes(
span.attributes
)

Expand Down
1 change: 0 additions & 1 deletion tests/clients/test_pep0249.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def test_collect_kvs(self) -> None:
select * from tests;
"""
self.test_wrapper._collect_kvs(span, sample_sql)
assert span.attributes["span.kind"] == SpanKind.CLIENT
assert span.attributes["db.name"] == "instana_test_db"
assert span.attributes["db.statement"] == sample_sql
assert span.attributes["db.user"] == "root"
Expand Down
1 change: 0 additions & 1 deletion tests/span/test_registered_span.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def test_collect_http_attributes_with_attributes(
) -> None:
span_name = "test-registered-span"
attributes = {
"span.kind": "entry",
"http.host": "localhost",
"http.url": "https://www.instana.com",
"http.header.test": "one more test",
Expand Down
Loading