-
Notifications
You must be signed in to change notification settings - Fork 57
Native instrumentation with OpenTelemetry #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
168bad8
62e9eb1
b4d8e60
8cc8757
d17a161
8d2266a
e306fa8
d0acb1d
d7fad12
d75395f
980628d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,137 @@ | ||||||
| import pytest | ||||||
|
|
||||||
| from opentelemetry import trace, metrics | ||||||
| from opentelemetry.sdk.trace import TracerProvider | ||||||
| from opentelemetry.sdk.trace.export import SimpleSpanProcessor | ||||||
| from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter | ||||||
| from opentelemetry.sdk.metrics import MeterProvider | ||||||
| from opentelemetry.sdk.metrics.export import InMemoryMetricReader | ||||||
|
|
||||||
| from ...scenarios import load_scenario | ||||||
|
|
||||||
| _SCENARIO = load_scenario("quickstart", use_jwt_middleware=False) | ||||||
|
|
||||||
| @pytest.fixture(scope="module") | ||||||
| def test_telemetry(): | ||||||
| """Set up fresh in-memory exporter for testing.""" | ||||||
| exporter = InMemorySpanExporter() | ||||||
| metric_reader = InMemoryMetricReader() | ||||||
|
|
||||||
| tracer_provider = TracerProvider() | ||||||
| tracer_provider.add_span_processor(SimpleSpanProcessor(exporter)) | ||||||
| trace.set_tracer_provider(tracer_provider) | ||||||
|
|
||||||
| meter_provider = MeterProvider([metric_reader]) | ||||||
|
||||||
| meter_provider = MeterProvider([metric_reader]) | |
| meter_provider = MeterProvider(metric_readers=[metric_reader]) |
Copilot
AI
Feb 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace: Line 58 contains trailing whitespace. Remove it for code cleanliness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: The 'base' module from email.mime is imported on line 13 but never used. Remove this import.