Multiplayer OpenTelemetry Python API
Project description
multiplayer-opentelemetry
Introduction
The multiplayer-opentelemetry module integrates OpenTelemetry with the Multiplayer platform to enable seamless trace collection and analysis. This library helps developers monitor, debug, and document application performance with detailed trace data. It supports flexible trace ID generation, sampling strategies.
Installation
To install the multiplayer-opentelemetry module, use the following command:
pip install multiplayer-opentelemetry
Multiplayer Http Trace Exporter
from multiplayer.opentelemetry.exporter.http.trace_exporter import MultiplayerOTLPSpanExporter
from opentelemetry.sdk.trace.export import BatchSpanProcessor
processor = BatchSpanProcessor(MultiplayerOTLPSpanExporter(
url = '<opentelemetry-collector-url>', # url is optional and can be omitted - default is https://api.multiplayer.app/v1/traces
apiKey = "<multiplayer-otel-key>"
))
Multiplayer Http Log Exporter
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
from multiplayer.opentelemetry.exporter.http.log_exporter import MultiplayerOTLPLogExporter
logProcessor = BatchLogRecordProcessor(MultiplayerOTLPLogExporter(
url = "<opentelemetry-collector-url>", # url is optional and can be omitted - default is https://api.multiplayer.app/v1/logs
apiKey = "<multiplayer-otel-key>"
))
Multiplayer Grpc Trace Exporter
from multiplayer.opentelemetry.exporter.grpc.trace_exporter import MultiplayerOTLPSpanExporter
from opentelemetry.sdk.trace.export import BatchSpanProcessor
processor = BatchSpanProcessor(MultiplayerOTLPSpanExporter(
url = '<opentelemetry-collector-url>', # url is optional and can be omitted - default is https://api.multiplayer.app/v1/traces
apiKey = "<multiplayer-otel-key>"
))
Multiplayer Grpc Log Exporter
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
from multiplayer.opentelemetry.exporter.grpc.log_exporter import MultiplayerOTLPLogExporter
logProcessor = BatchLogRecordProcessor(MultiplayerOTLPLogExporter(
url = "<opentelemetry-collector-url>", # url is optional and can be omitted - default is https://api.multiplayer.app/v1/logs
apiKey = "<multiplayer-otel-key>"
))
Multiplayer trace Id generator
from multiplayer.opentelemetry.trace.sampler import MultiplayerTraceIdRatioBasedSampler
sampler = MultiplayerTraceIdRatioBasedSampler(rate = 1/2)
Multiplayer trace id ratio based sampler
from multiplayer.opentelemetry.trace.id_generator import MultiplayerRandomIdGenerator
id_generator = MultiplayerRandomIdGenerator(autoDocTracesRatio = 1/1000)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multiplayer_opentelemetry-0.0.7.tar.gz.
File metadata
- Download URL: multiplayer_opentelemetry-0.0.7.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f98307a5100d565a374a53cc06e9664cb84d487e75058cd931bed1f8446dee11
|
|
| MD5 |
9863fdb0bc14ffda40685996f2ab747f
|
|
| BLAKE2b-256 |
33fd4c5447509374fa88e36b226d101bbbfa0c8558ff5ee1cb85d93cd2ff90e0
|
File details
Details for the file multiplayer_opentelemetry-0.0.7-py3-none-any.whl.
File metadata
- Download URL: multiplayer_opentelemetry-0.0.7-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82f9f257c7e71d3bd943eaa3160f18efabc1b4be5786ccf07d66c8a7e6c5afb2
|
|
| MD5 |
f7a943266d1a8c72755912077bf0df90
|
|
| BLAKE2b-256 |
6b3cd35c0635b07168c13213c38c2126aa09df849c9943c0078a953851ab9d8e
|