Skip to content

Commit 7c18e78

Browse files
committed
fixes, mypy fixees
1 parent eef0e92 commit 7c18e78

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

sentry_sdk/scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def iter_trace_propagation_headers(
672672
span = span or self.span
673673

674674
if has_tracing_enabled(client.options) and span is not None:
675-
for header in span.iter_headers():
675+
for header in span._iter_headers():
676676
yield header
677677
elif has_external_propagation_context():
678678
# when we have an external_propagation_context (otlp)

sentry_sdk/traces.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,14 @@ def trace_id(self) -> str:
434434
def sampled(self) -> "Optional[bool]":
435435
return True
436436

437+
@property
438+
def start_timestamp(self) -> "Optional[datetime]":
439+
return self._start_timestamp
440+
441+
@property
442+
def timestamp(self) -> "Optional[datetime]":
443+
return self._timestamp
444+
437445
def is_segment(self) -> bool:
438446
return self._segment == self
439447

@@ -501,7 +509,7 @@ def _get_baggage(self) -> "Baggage":
501509
def _get_trace_context(self) -> "dict[str, Any]":
502510
# Even if spans themselves are not event-based anymore, we need this
503511
# to populate trace context on events
504-
context = {
512+
context: "dict[str, Any]" = {
505513
"trace_id": self.trace_id,
506514
"span_id": self.span_id,
507515
"parent_span_id": self._parent_span_id,

0 commit comments

Comments
 (0)