Jan Gnezda
01/15/2025, 9:38 AMJan Gnezda
01/15/2025, 9:41 AMSrikanth Chekuri
01/15/2025, 10:11 AMJan Gnezda
01/15/2025, 10:17 AM$ poetry run python
Python 3.9.5 (default, Mar 20 2023, 11:38:27)
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from opentelemetry.metrics import set_meter_provider, get_meter_provider
>>> from opentelemetry.sdk.metrics import MeterProvider
>>> from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
>>> from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter
>>> reader = PeriodicExportingMetricReader(OTLPMetricExporter())
>>> set_meter_provider(MeterProvider(metric_readers=[reader]))
>>> from opentelemetry import metrics
>>> meter = metrics.get_meter("local.console")
>>> counter = meter.create_counter(name="test_tasks_completed", unit="1", description="The number of tasks completed")
>>> counter.add(1)
... (a number of counter.add() calls)
Srikanth Chekuri
01/15/2025, 10:23 AMJan Gnezda
01/15/2025, 10:25 AMIncrease
or Rate
.Srikanth Chekuri
01/15/2025, 10:27 AMOTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
Srikanth Chekuri
01/15/2025, 10:27 AMJan Gnezda
01/15/2025, 10:29 AMJan Gnezda
01/16/2025, 8:57 AMDoug Ramirez
01/21/2025, 10:34 PMJan Gnezda
01/22/2025, 7:25 AMOTEL_RESOURCE_ATTRIBUTES=service.name=test_console_local
OTEL_EXPORTER_OTLP_ENDPOINT="<https://ingest.eu.signoz.cloud:443>"
OTEL_EXPORTER_OTLP_HEADERS="signoz-ingestion-key=my_key"
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
Replace my_key
with a valid ingestion key.Doug Ramirez
01/22/2025, 11:45 PM