Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 0a92e60

Browse files
authored
Remove sql query from span name (#84)
1 parent 0c7c83d commit 0a92e60

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

trace/opencensus/trace/ext/dbapi/trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def trace_cursor_query(query_func):
5454
def call(query, *args, **kwargs):
5555
_tracer = execution_context.get_opencensus_tracer()
5656
_span = _tracer.start_span()
57-
_span.name = '[mysql.query]{}'.format(query)
57+
_span.name = 'mysql.query'
5858
_tracer.add_label_to_current_span('mysql/query', query)
5959
_tracer.add_label_to_current_span(
6060
'mysql/cursor/method/name',

trace/opencensus/trace/ext/postgresql/trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def trace_cursor_query(query_func):
4949
def call(query, *args, **kwargs):
5050
_tracer = execution_context.get_opencensus_tracer()
5151
_span = _tracer.start_span()
52-
_span.name = '[{}.query]{}'.format(MODULE_NAME, query)
52+
_span.name = '{}.query'.format(MODULE_NAME)
5353
_tracer.add_label_to_current_span(
5454
'{}/query'.format(MODULE_NAME), query)
5555
_tracer.add_label_to_current_span(

0 commit comments

Comments
 (0)