posthog 8.2.2__tar.gz → 8.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {posthog-8.2.2/posthog.egg-info → posthog-8.2.4}/PKG-INFO +1 -1
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/langchain/callbacks.py +25 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/otel/_privacy.py +16 -5
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_privacy_mode.py +42 -0
- posthog-8.2.4/posthog/version.py +1 -0
- {posthog-8.2.2 → posthog-8.2.4/posthog.egg-info}/PKG-INFO +1 -1
- {posthog-8.2.2 → posthog-8.2.4}/pyproject.toml +1 -1
- posthog-8.2.2/posthog/version.py +0 -1
- {posthog-8.2.2 → posthog-8.2.4}/LICENSE +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/MANIFEST.in +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/README.md +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/_async_consumer.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/_async_request.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/_async_utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/_disabled_lane_queue.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/_logging.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/_metrics_autocapture.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/anthropic/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/anthropic/_anthropic_stream.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/anthropic/anthropic.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/anthropic/anthropic_async.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/anthropic/anthropic_converter.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/anthropic/anthropic_providers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/claude_agent_sdk/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/claude_agent_sdk/client.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/claude_agent_sdk/formatting.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/claude_agent_sdk/processor.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_async_datasets.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_client.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_dataset_serialization.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_dataset_types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_datasets.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_errors.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_mutations.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_scorer_types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_scorers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_serialization.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_tags.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_transport.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/evaluations/_types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/gateway.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/gemini/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/gemini/_shared.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/gemini/gemini.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/gemini/gemini_async.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/gemini/gemini_converter.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/langchain/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/langchain/middleware.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/media.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/_embeddings.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/_streaming.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/openai.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/openai_async.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/openai_converter.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/openai_providers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai/wrapper_utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai_agents/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/openai_agents/processor.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/otel/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/otel/_request_context.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/otel/exporter.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/otel/processor.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/otel/spans.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/prompts.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/sanitization.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/stream.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/ai/utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/args.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/async_client.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/bucketed_rate_limiter.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/capture_compression.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/capture_event.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/capture_send.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/client.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/consumer.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/contexts.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/emails.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/exception_capture.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/exception_utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/feature_flag_evaluations.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/feature_flags.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/flag_definition_cache.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/_tracing_headers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/asgi.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/celery.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/django.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/drf.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/flask.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/integrations/otel.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_argument_ownership.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_capture.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_compatibility.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_context_parameters.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_conversation_id.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_event_types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_exceptions.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_ids.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_instrument_fastmcp.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_instrument_lowlevel.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_instrument_v2.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_instrumentation.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_intent.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_internal.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_model_parameters.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_output_instructions.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_posthog_events.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_raised_tool_error.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_sanitization.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_server_build.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_sink.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_tool_input.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_transport_identity.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/_truncation.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/asgi.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/constants.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/feedback.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/logger.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/posthog_mcp.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/request_headers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/session.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/session_token.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/tools.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/mcp/version.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/metrics_capture.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/poller.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/py.typed +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/release_id.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/request.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/claude_agent_sdk/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/claude_agent_sdk/test_client.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/claude_agent_sdk/test_processor.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/claude_agent_sdk/test_processor_content.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/openai_agents/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/openai_agents/test_processor.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/otel/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/otel/conftest.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/otel/test_exporter.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/otel/test_processor.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/otel/test_spans.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_async_cancellation.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_async_stream_wrapper.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_capture_contract.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_capture_pipeline.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_evaluations.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_evaluations_datasets.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_evaluations_mutations.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_evaluations_scorers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_evaluations_transport.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_gateway.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_http_status.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_media.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_prompts.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_sanitization.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_stream_midstream_error.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_system_prompts.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_token_reporting.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_tokens_source.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/test_utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/ai/utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/capture_helpers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/conftest.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/logging_helpers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/_helpers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/_helpers_lowlevel.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/_helpers_v2.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/conftest.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_asgi.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_capture.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_conversation_session.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_defaults.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_error_properties.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_error_status.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_fastmcp.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_fastmcp_tool_errors.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_fastmcp_v2.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_fastmcp_v4.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_features_m4.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_feedback.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_initialize_handshake.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_instrument_lowlevel_ownership.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_instrument_v2.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_instrumentation_fork.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_lib_label.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_lowlevel.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_model_parameters.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_no_crash.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_output_instructions.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_pending_tasks.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_pipeline.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_posthog_mcp.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_request_headers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_resources.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_review_fixes.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_send_tools_list_event.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_session_token.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_tool_input.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_transport_identity.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_truncation.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_units.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_unknown_tool.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_v2_lowlevel.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_v2_mcpserver.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_v2_wire_dual_era.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/mcp/test_virtual_tools.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/released_flags_scenarios.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_ai_capture_lane.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_async_client.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_async_consumer.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_async_feature_flags.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_async_request.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_async_utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_before_send.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_bucketed_rate_limiter.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_capture_compression.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_capture_event.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_capture_invariants.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_capture_send.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_client.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_client_crap_flags.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_client_fork.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_code_variables.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_consumer.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_contexts.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_emails.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_evaluate_flags.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_event_options.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_exception_capture.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_exception_utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_experiment_exposure.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_failed_flag_records.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_feature_flag.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_feature_flag_called_minimization.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_feature_flag_has_experiment.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_feature_flag_result.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_feature_flags.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_feature_flags_regex.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_flag_cache_eviction_reads.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_flag_cache_publication.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_flag_definition_cache.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_flag_payload_parsing.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_flags_released_behaviour.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_flags_v4_response.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_gevent_compat.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_metrics.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_metrics_autocapture.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_module.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_posthog_upgrade_workflow.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_property_matching_version.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_redis_flag_cache_snapshot.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_reference_markdown.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_release_id.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_request.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_server_payload_snapshots.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_size_limited_dict.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/test_utils_acceptance.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/conftest.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/helpers.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_client_traces.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_config.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_export.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_ids.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_limits.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_otlp.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_pipeline.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_sanitize.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_span.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_traceparent.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/test/tracing/test_transport.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/__init__.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_before_span_send.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_config.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_context.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_drops.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_export.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_ids.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_limits.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_otlp.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_pipeline.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_sanitize.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_span.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_traceparent.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/_transport.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/tracing/span.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/types.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog/utils.py +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog.egg-info/SOURCES.txt +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog.egg-info/dependency_links.txt +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog.egg-info/requires.txt +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/posthog.egg-info/top_level.txt +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/setup.cfg +0 -0
- {posthog-8.2.2 → posthog-8.2.4}/setup.py +0 -0
|
@@ -1055,6 +1055,31 @@ def _parse_usage_model(
|
|
|
1055
1055
|
normalized_usage.input_tokens = max(
|
|
1056
1056
|
normalized_usage.input_tokens - cache_tokens, 0
|
|
1057
1057
|
)
|
|
1058
|
+
|
|
1059
|
+
# PostHog prices Gemini reasoning on top of the output count, as the Gemini
|
|
1060
|
+
# wrapper reports it. langchain-google-genai folds thoughts_token_count into
|
|
1061
|
+
# output_tokens, so take it back out. Other integrations (ChatVertexAI, older
|
|
1062
|
+
# langchain-google-genai) report candidates only, which the totals show:
|
|
1063
|
+
# input and output only reach total_tokens when reasoning is in the output.
|
|
1064
|
+
is_gemini = bool(model and "gemini" in model.lower())
|
|
1065
|
+
total_tokens = usage.get("total_tokens")
|
|
1066
|
+
reasoning_in_output = (
|
|
1067
|
+
isinstance(total_tokens, int)
|
|
1068
|
+
and total_tokens > 0
|
|
1069
|
+
and isinstance(normalized_usage.input_tokens, int)
|
|
1070
|
+
and isinstance(normalized_usage.output_tokens, int)
|
|
1071
|
+
and normalized_usage.input_tokens + normalized_usage.output_tokens
|
|
1072
|
+
>= total_tokens
|
|
1073
|
+
)
|
|
1074
|
+
if (
|
|
1075
|
+
is_gemini
|
|
1076
|
+
and reasoning_in_output
|
|
1077
|
+
and normalized_usage.output_tokens
|
|
1078
|
+
and normalized_usage.reasoning_tokens
|
|
1079
|
+
):
|
|
1080
|
+
normalized_usage.output_tokens = max(
|
|
1081
|
+
normalized_usage.output_tokens - normalized_usage.reasoning_tokens, 0
|
|
1082
|
+
)
|
|
1058
1083
|
return normalized_usage
|
|
1059
1084
|
|
|
1060
1085
|
|
|
@@ -278,14 +278,19 @@ def _without_content_span(span: ReadableSpan) -> ReadableSpan:
|
|
|
278
278
|
if event.name == _EXCEPTION_EVENT_NAME
|
|
279
279
|
],
|
|
280
280
|
)
|
|
281
|
+
attributes = _without_content(span.attributes)
|
|
282
|
+
links = BoundedList.from_seq(None, span.links)
|
|
283
|
+
attributes.dropped = span.dropped_attributes
|
|
284
|
+
events.dropped = span.dropped_events
|
|
285
|
+
links.dropped = span.dropped_links
|
|
281
286
|
return ReadableSpan(
|
|
282
287
|
name=span.name,
|
|
283
288
|
context=span.get_span_context(),
|
|
284
289
|
parent=span.parent,
|
|
285
290
|
resource=span.resource,
|
|
286
|
-
attributes=
|
|
291
|
+
attributes=attributes,
|
|
287
292
|
events=events,
|
|
288
|
-
links=
|
|
293
|
+
links=links,
|
|
289
294
|
kind=span.kind,
|
|
290
295
|
status=Status(span.status.status_code),
|
|
291
296
|
start_time=span.start_time,
|
|
@@ -309,14 +314,20 @@ def _without_mcp_credentials_span(span: ReadableSpan) -> ReadableSpan:
|
|
|
309
314
|
redacted[key] is attributes[key] for key in attributes
|
|
310
315
|
):
|
|
311
316
|
return span
|
|
317
|
+
redacted_attributes = BoundedAttributes(attributes=redacted)
|
|
318
|
+
events = BoundedList.from_seq(None, span.events)
|
|
319
|
+
links = BoundedList.from_seq(None, span.links)
|
|
320
|
+
redacted_attributes.dropped = span.dropped_attributes
|
|
321
|
+
events.dropped = span.dropped_events
|
|
322
|
+
links.dropped = span.dropped_links
|
|
312
323
|
return ReadableSpan(
|
|
313
324
|
name=span.name,
|
|
314
325
|
context=span.get_span_context(),
|
|
315
326
|
parent=span.parent,
|
|
316
327
|
resource=span.resource,
|
|
317
|
-
attributes=
|
|
318
|
-
events=
|
|
319
|
-
links=
|
|
328
|
+
attributes=redacted_attributes,
|
|
329
|
+
events=events,
|
|
330
|
+
links=links,
|
|
320
331
|
kind=span.kind,
|
|
321
332
|
status=span.status,
|
|
322
333
|
start_time=span.start_time,
|
|
@@ -766,6 +766,48 @@ def test_otel_masks_mcp_credentials_without_privacy_mode(
|
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
|
|
769
|
+
@pytest.mark.parametrize("privacy_mode", [True, False])
|
|
770
|
+
def test_otel_redacted_span_keeps_counts_dropped_by_span_limits(
|
|
771
|
+
privacy_mode: bool,
|
|
772
|
+
) -> None:
|
|
773
|
+
pytest.importorskip("opentelemetry.exporter.otlp.proto.http")
|
|
774
|
+
from opentelemetry.sdk.trace import SpanLimits, TracerProvider
|
|
775
|
+
from opentelemetry.trace import Link
|
|
776
|
+
|
|
777
|
+
from posthog.ai.otel import PostHogTraceExporter
|
|
778
|
+
|
|
779
|
+
tracer = TracerProvider(
|
|
780
|
+
span_limits=SpanLimits(max_attributes=2, max_events=1, max_links=1)
|
|
781
|
+
).get_tracer("test")
|
|
782
|
+
linked = [Link(tracer.start_span("linked").get_span_context()) for _ in range(3)]
|
|
783
|
+
# The limit evicts the oldest attributes, so the MCP tools go last to survive it.
|
|
784
|
+
span = tracer.start_span(
|
|
785
|
+
"gen_ai.chat",
|
|
786
|
+
attributes={
|
|
787
|
+
"gen_ai.input.messages": "user prompt",
|
|
788
|
+
"gen_ai.request.model": "gpt-4o",
|
|
789
|
+
"ai.prompt.tools": json.dumps(_MCP_OTEL_TOOL),
|
|
790
|
+
},
|
|
791
|
+
links=linked,
|
|
792
|
+
)
|
|
793
|
+
span.add_event("first")
|
|
794
|
+
# Privacy mode keeps exception events, and opentelemetry-sdk < 1.22 reports 0
|
|
795
|
+
# dropped events for a span left with none.
|
|
796
|
+
span.record_exception(ValueError(CANARY))
|
|
797
|
+
span.end()
|
|
798
|
+
|
|
799
|
+
with patch("posthog.ai.otel.exporter.OTLPSpanExporter") as otlp:
|
|
800
|
+
PostHogTraceExporter(api_key="phc_test", privacy_mode=privacy_mode).export(
|
|
801
|
+
[span]
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
[[exported]] = otlp.return_value.export.call_args.args
|
|
805
|
+
assert exported is not span
|
|
806
|
+
assert exported.dropped_attributes == 1
|
|
807
|
+
assert exported.dropped_events == 1
|
|
808
|
+
assert exported.dropped_links == 2
|
|
809
|
+
|
|
810
|
+
|
|
769
811
|
@pytest.mark.parametrize("privacy_mode", [True, False])
|
|
770
812
|
def test_otel_exporter_drops_only_the_span_that_fails_redaction(
|
|
771
813
|
privacy_mode: bool,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "8.2.4"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "posthog"
|
|
7
|
-
version = "8.2.
|
|
7
|
+
version = "8.2.4"
|
|
8
8
|
description = "Integrate PostHog into any python application."
|
|
9
9
|
authors = [{ name = "PostHog", email = "engineering@posthog.com" }]
|
|
10
10
|
maintainers = [{ name = "PostHog", email = "engineering@posthog.com" }]
|
posthog-8.2.2/posthog/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "8.2.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|