Metadata-Version: 2.1
Name: opentelemetry-instrumentation-aliyun-ons-http
Version: 0.47b0
Summary: Aliyun ons http api instrumentation for OpenTelemetry
Author-email: fcfangcc <swjfc22@live.com>
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: opentelemetry-api~=1.12
Requires-Dist: opentelemetry-instrumentation==0.47b0
Requires-Dist: opentelemetry-semantic-conventions==0.47b0
Requires-Dist: wrapt<2.0.0,>=1.0.0
Provides-Extra: instruments
Requires-Dist: mq_http_sdk<2.0.0,>1.0.0; extra == "instruments"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"

OpenTelemetry Aliyun Ons Http SDK Instrumentation
===================================================

This library provides automatic and manual instrumentation of Aliyun Ons **mq_http_sdk**

auto-instrumentation using the opentelemetry-instrumentation package is also supported.


Installation
------------

.. code-block:: shell

    pip install opentelemetry-instrumentation-aliyun-ons-http

Usage
------

.. code-block:: python

    from opentelemetry.instrumentation.aliyun_ons_http import AliyunOnsHttpInstrumentor

    AliyunOnsHttpInstrumentor.instrument()


Note:

    Consumers are in batches, so it is not possible to automatically add trace information to each message.
    
    When process messages, manually call it.

.. code-block:: python

    from opentelemetry.instrumentation.aliyun_ons_http import process_record
    ...
    messages = consumer.consume_message():
    for message in messages:
        with process_record(message):
            # do your business



References
----------

* `OpenTelemetry Project <https://opentelemetry.io/>`_
* `OpenTelemetry Python Examples <https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples>`_
