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.66b2

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.66b2
File Size Uploaded Provenance Actions
opentelemetry_exporter_otlp_json_http-0.66b2.tar.gz 17.6 kB Without provenance Details for opentelemetry_exporter_otlp_json_http-0.66b2.tar.gz

Built distribution (wheel)

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

Total release size: 32.1 kB

Release files / opentelemetry_exporter_otlp_json_http-0.66b2.tar.gz

Download URL opentelemetry_exporter_otlp_json_http-0.66b2.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
35cab5377d5c4f9934a4f3e4638b605bd20a82ab7d4097ecbbcbf64d50557f1b
BLAKE2b-256 checksum
How to use checksums
c290f6bdf43bbe7d1dba064a0810f7e93278467211ab95f0138340f4e54f0252
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.66b2-py3-none-any.whl

Download URL opentelemetry_exporter_otlp_json_http-0.66b2-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56a91c92e09c83c01d07380f48df6f649f3ce89fd47aa8c4862ef84de8e47ddb
BLAKE2b-256 checksum
How to use checksums
a59314352b66556393a646b6cc1fb06ffd5661c4c4f08259070696f02f8f351d
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.66b2

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