Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ae99f9

Browse files
committed
Remove commented code
1 parent f5ae625 commit 2ae99f9

File tree

1 file changed

+0
-24
lines changed
  • ext/opentelemetry-ext-grpc/src/opentelemetry/ext/grpc

1 file changed

+0
-24
lines changed

ext/opentelemetry-ext-grpc/src/opentelemetry/ext/grpc/_server.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -94,35 +94,11 @@ def set_details(self, details):
9494
return self._servicer_context.set_details(details)
9595

9696

97-
# def _add_peer_tags(peer_str, tags):
98-
# ipv4_re = r"ipv4:(?P<address>.+):(?P<port>\d+)"
99-
# match = re.match(ipv4_re, peer_str)
100-
# if match:
101-
# tags[ot_tags.PEER_HOST_IPV4] = match.group("address")
102-
# tags[ot_tags.PEER_PORT] = match.group("port")
103-
# return
104-
# ipv6_re = r"ipv6:\[(?P<address>.+)\]:(?P<port>\d+)"
105-
# match = re.match(ipv6_re, peer_str)
106-
# if match:
107-
# tags[ot_tags.PEER_HOST_IPV6] = match.group("address")
108-
# tags[ot_tags.PEER_PORT] = match.group("port")
109-
# return
110-
# logging.warning('Unrecognized peer: "%s"', peer_str)
111-
112-
11397
# On the service-side, errors can be signaled either by exceptions or by
11498
# calling `set_code` on the `servicer_context`. This function checks for the
11599
# latter and updates the span accordingly.
116100
def _check_error_code(span, servicer_context, rpc_info):
117101
if servicer_context.code != grpc.StatusCode.OK:
118-
# span.set_tag("error", True)
119-
# error_log = {
120-
# "event": "error",
121-
# "error.kind": str(servicer_context.code),
122-
# }
123-
# if servicer_context.details is not None:
124-
# error_log["message"] = servicer_context.details
125-
# span.log_kv(error_log)
126102
rpc_info.error = servicer_context.code
127103

128104

0 commit comments

Comments
 (0)