import typing
from typing import Optional

from ddtrace._trace.span import Span

def init(
    env: Optional[str],
    service: Optional[str],
    version: Optional[str],
    tags: Optional[typing.Dict[str, str]],
    max_nframes: Optional[int],
    url: Optional[str],
) -> None: ...
def upload() -> None: ...

class SampleHandle:
    def push_cputime(self, value: int, count: int) -> None: ...
    def push_walltime(self, value: int, count: int) -> None: ...
    def push_acquire(self, value: int, count: int) -> None: ...
    def push_release(self, value: int, count: int) -> None: ...
    def push_alloc(self, value: int, count: int) -> None: ...
    def push_heap(self, value: int) -> None: ...
    def push_lock_name(self, lock_name: str) -> None: ...
    def push_frame(self, name: str, filename: str, address: int, line: int) -> None: ...
    def push_threadinfo(self, thread_id: int, thread_native_id: int, thread_name: Optional[str]) -> None: ...
    def push_taskinfo(self, task_id: int, task_name: str) -> None: ...
    def push_exceptioninfo(self, exc_type: type, count: int) -> None: ...
    def push_class_name(self, class_name: str) -> None: ...
    def push_span(self, span: typing.Optional[Span], endpoint_collection_enabled: bool) -> None: ...
    def flush_sample(
        self,
    ) -> None: ...
