|
67 | 67 | Deque, |
68 | 68 | Dict, |
69 | 69 | Generator, |
70 | | - Iterator, |
71 | 70 | List, |
72 | 71 | Optional, |
73 | 72 | ParamSpec, |
@@ -572,18 +571,6 @@ def generate_propagation_context( |
572 | 571 | if self._propagation_context is None: |
573 | 572 | self.set_new_propagation_context() |
574 | 573 |
|
575 | | - def get_dynamic_sampling_context(self) -> "Optional[Dict[str, str]]": |
576 | | - """ |
577 | | - Returns the Dynamic Sampling Context from the Propagation Context. |
578 | | - If not existing, creates a new one. |
579 | | -
|
580 | | - Deprecated: Logic moved to PropagationContext, don't use directly. |
581 | | - """ |
582 | | - if self._propagation_context is None: |
583 | | - return None |
584 | | - |
585 | | - return self._propagation_context.dynamic_sampling_context |
586 | | - |
587 | 574 | def get_traceparent(self, *args: "Any", **kwargs: "Any") -> "Optional[str]": |
588 | 575 | """ |
589 | 576 | Returns the Sentry "sentry-trace" header (aka the traceparent) from the |
@@ -655,27 +642,13 @@ def trace_propagation_meta(self, *args: "Any", **kwargs: "Any") -> str: |
655 | 642 | Return meta tags which should be injected into HTML templates |
656 | 643 | to allow propagation of trace information. |
657 | 644 | """ |
658 | | - span = kwargs.pop("span", None) |
659 | | - if span is not None: |
660 | | - logger.warning( |
661 | | - "The parameter `span` in trace_propagation_meta() is deprecated and will be removed in the future." |
662 | | - ) |
663 | | - |
664 | 645 | meta = "" |
665 | 646 |
|
666 | 647 | for name, content in self.iter_trace_propagation_headers(): |
667 | 648 | meta += f'<meta name="{name}" content="{content}">' |
668 | 649 |
|
669 | 650 | return meta |
670 | 651 |
|
671 | | - def iter_headers(self) -> "Iterator[Tuple[str, str]]": |
672 | | - """ |
673 | | - Creates a generator which returns the `sentry-trace` and `baggage` headers from the Propagation Context. |
674 | | - Deprecated: use PropagationContext.iter_headers instead. |
675 | | - """ |
676 | | - if self._propagation_context is not None: |
677 | | - yield from self._propagation_context.iter_headers() |
678 | | - |
679 | 652 | def iter_trace_propagation_headers( |
680 | 653 | self, *args: "Any", **kwargs: "Any" |
681 | 654 | ) -> "Generator[Tuple[str, str], None, None]": |
@@ -759,22 +732,6 @@ def clear(self) -> None: |
759 | 732 |
|
760 | 733 | self._gen_ai_conversation_id: "Optional[str]" = None |
761 | 734 |
|
762 | | - @_attr_setter |
763 | | - def level(self, value: "LogLevelStr") -> None: |
764 | | - """ |
765 | | - When set this overrides the level. |
766 | | -
|
767 | | - .. deprecated:: 1.0.0 |
768 | | - Use :func:`set_level` instead. |
769 | | -
|
770 | | - :param value: The level to set. |
771 | | - """ |
772 | | - logger.warning( |
773 | | - "Deprecated: use .set_level() instead. This will be removed in the future." |
774 | | - ) |
775 | | - |
776 | | - self._level = value |
777 | | - |
778 | 735 | def set_level(self, value: "LogLevelStr") -> None: |
779 | 736 | """ |
780 | 737 | Sets the level for the scope. |
@@ -865,16 +822,6 @@ def set_transaction_name(self, name: str, source: "Optional[str]" = None) -> Non |
865 | 822 | if source: |
866 | 823 | self._transaction_info["source"] = source |
867 | 824 |
|
868 | | - @_attr_setter |
869 | | - def user(self, value: "Optional[Dict[str, Any]]") -> None: |
870 | | - """When set a specific user is bound to the scope. Deprecated in favor of set_user.""" |
871 | | - warnings.warn( |
872 | | - "The `Scope.user` setter is deprecated in favor of `Scope.set_user()`.", |
873 | | - DeprecationWarning, |
874 | | - stacklevel=2, |
875 | | - ) |
876 | | - self.set_user(value) |
877 | | - |
878 | 825 | def set_user(self, value: "Optional[Dict[str, Any]]") -> None: |
879 | 826 | """Sets a user for the scope.""" |
880 | 827 | self._user = value |
|
0 commit comments