opentelemetry-python-contrib/resource/opentelemetry-resource-dete...
Severin Neumann 7f4853ac79
fix: revert modifications to Apache license (#2429)
* fix: revert modifications to Apache license

See open-telemetry/community#2056 for background

* path all LICENSE files

Signed-off-by: svrnm <neumanns@cisco.com>

* Fix missing LICENSE files

---------

Signed-off-by: svrnm <neumanns@cisco.com>
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-04-22 13:23:38 -05:00
..
src/opentelemetry/resource/detector/container Update version to 1.25.0.dev/0.46b0.dev (#2376) 2024-03-28 14:25:18 -07:00
tests Resource detector for container properties (#1584) 2023-05-22 11:24:31 -06:00
LICENSE fix: revert modifications to Apache license (#2429) 2024-04-22 13:23:38 -05:00
MANIFEST.rst Azure resource detectors (#1901) 2023-08-17 13:21:59 -07:00
README.rst Resource detector for container properties (#1584) 2023-05-22 11:24:31 -06:00
pyproject.toml Remove [test] package from resource-detector-container (#2319) 2024-03-21 15:44:53 -06:00
test-requirements.txt Remove [test] package from resource-detector-container (#2319) 2024-03-21 15:44:53 -06:00

README.rst

OpenTelemetry Resource detectors for containers
==========================================================

|pypi|

.. |pypi| image:: TODO
   :target: TODO


This library provides custom resource detector for container platforms

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

::

    pip install opentelemetry-resource-detector-container

---------------------------

Usage example for `opentelemetry-resource-detector-container`

.. code-block:: python

    from opentelemetry import trace
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.resource.detector.container import (
        ContainerResourceDetector,
    )
    from opentelemetry.sdk.resources import get_aggregated_resources


    trace.set_tracer_provider(
        TracerProvider(
            resource=get_aggregated_resources(
                [
                    ContainerResourceDetector(),
                ]
            ),
        )
    )

References
----------

* `OpenTelemetry Project <https://opentelemetry.io/>`_