File tree Expand file tree Collapse file tree
opentelemetry-exporter-google-cloud/src/opentelemetry/exporter/cloud_trace
opentelemetry-tools-google-cloud/src/opentelemetry/tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11allowedLicenses :
22 - Apache-2.0
3+ allowedCopyrightHolders :
4+ - Google
5+ - OpenTelemetry Authors
36sourceFileExtensions :
47 - py
58 - sh
Original file line number Diff line number Diff line change @@ -10,5 +10,5 @@ Sphinx==3.1.2
1010# development before GA. After GA, we will build against specific releases.
1111# Bump the commit frequently during development whenever you are missing
1212# changes from upstream.
13- opentelemetry-api~=0.16b1
14- opentelemetry-sdk~=0.16b1
13+ opentelemetry-api~=0.17b0
14+ opentelemetry-sdk~=0.17b0
Original file line number Diff line number Diff line change @@ -388,7 +388,9 @@ def _extract_attributes(
388388 add_agent_attr : bool = False ,
389389) -> ProtoSpan .Attributes :
390390 """Convert span.attributes to dict."""
391- attributes_dict = BoundedDict (num_attrs_limit )
391+ attributes_dict = BoundedDict (
392+ num_attrs_limit
393+ ) # type: BoundedDict[str, AttributeValue]
392394 invalid_value_dropped_count = 0
393395 for key , value in attrs .items () if attrs else []:
394396 key = _truncate_str (key , 128 )[0 ]
@@ -411,7 +413,7 @@ def _extract_attributes(
411413 )
412414 return ProtoSpan .Attributes (
413415 attribute_map = attributes_dict ,
414- dropped_attributes_count = attributes_dict .dropped
416+ dropped_attributes_count = attributes_dict .dropped # type: ignore[attr-defined]
415417 + invalid_value_dropped_count ,
416418 )
417419
Original file line number Diff line number Diff line change 2828_TRACE_CONTEXT_HEADER_NAME = "X-Cloud-Trace-Context"
2929_TRACE_CONTEXT_HEADER_FORMAT = r"(?P<trace_id>[0-9a-f]{32})\/(?P<span_id>[\d]{1,20});o=(?P<trace_flags>\d+)"
3030_TRACE_CONTEXT_HEADER_RE = re .compile (_TRACE_CONTEXT_HEADER_FORMAT )
31+ _FIELDS = {_TRACE_CONTEXT_HEADER_NAME }
3132
3233
3334class CloudTraceFormatPropagator (textmap .TextMapPropagator ):
@@ -85,3 +86,7 @@ def inject(
8586 int (span_context .trace_flags .sampled ),
8687 )
8788 set_in_carrier (carrier , _TRACE_CONTEXT_HEADER_NAME , header )
89+
90+ @property
91+ def fields (self ) -> typing .Set [str ]:
92+ return _FIELDS
You can’t perform that action at this time.
0 commit comments