Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OpenTelemetry Collector JSON over HTTP Exporter

pypi

This library exports OpenTelemetry traces, metrics and logs using the OpenTelemetry Protocol (OTLP) JSON encoding over HTTP. It can be used to send data to any backend that accepts OTLP JSON such as the OpenTelemetry Collector.

Installation

pip install opentelemetry-exporter-otlp-json-http

Usage

from opentelemetry import trace
from opentelemetry.exporter.otlp.json.http import OTLPSpanExporter
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor

resource = Resource.create({
    "service.name": "service"
})

trace.set_tracer_provider(TracerProvider(resource=resource))
tracer = trace.get_tracer(__name__)

otlp_exporter = OTLPSpanExporter()

span_processor = BatchSpanProcessor(otlp_exporter)

trace.get_tracer_provider().add_span_processor(span_processor)

with tracer.start_as_current_span("foo"):
    print("Hello world!")

References

Metadata

Release files for opentelemetry-exporter-otlp-json-http 0.66b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentelemetry-exporter-otlp-json-http 0.66b1
File Size Uploaded Provenance Actions
opentelemetry_exporter_otlp_json_http-0.66b1.tar.gz 17.6 kB Without provenance Details for opentelemetry_exporter_otlp_json_http-0.66b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opentelemetry-exporter-otlp-json-http 0.66b1
File Interpreter ABI Platform Actions
opentelemetry_exporter_otlp_json_http-0.66b1-py3-none-any.whl Python 3 none any Details for opentelemetry_exporter_otlp_json_http-0.66b1-py3-none-any.whl

Total release size: 32.1 kB

Release files / opentelemetry_exporter_otlp_json_http-0.66b1.tar.gz

Download URL opentelemetry_exporter_otlp_json_http-0.66b1.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
940ca96fff3509ca06b3ce8733d4818ee022620aa9329cb7025c63e43c2d224d
BLAKE2b-256 checksum
How to use checksums
443047c00f9329242b71724df87536613cb21596b41f294cdc37d8b216c5afaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / opentelemetry_exporter_otlp_json_http-0.66b1-py3-none-any.whl

Download URL opentelemetry_exporter_otlp_json_http-0.66b1-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bd7607120fb7cc77aae88d5c7f629c40515d225b3ca5db293d20d091a248156
BLAKE2b-256 checksum
How to use checksums
e22d469689a34b17ed83d4ddee480db8322246dcffeb95ef5fc5050bb8a16c8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for opentelemetry-exporter-otlp-json-http 0.66b1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page