opentelemetry-exporter-gcp-trace


Nameopentelemetry-exporter-gcp-trace JSON
Version 1.7.0 PyPI version JSON
download
home_pagehttps://github.com/GoogleCloudPlatform/opentelemetry-operations-python/tree/main/opentelemetry-exporter-gcp-trace
SummaryGoogle Cloud Trace exporter for OpenTelemetry
upload_time2024-08-27 19:25:53
maintainerNone
docs_urlNone
authorGoogle
requires_python>=3.7
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            OpenTelemetry Google Cloud Integration
======================================

.. image:: https://badge.fury.io/py/opentelemetry-exporter-gcp-trace.svg
    :target: https://badge.fury.io/py/opentelemetry-exporter-gcp-trace

.. image:: https://readthedocs.org/projects/google-cloud-opentelemetry/badge/?version=latest
    :target: https://google-cloud-opentelemetry.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

This library provides support for exporting traces to Google Cloud Trace.

For resource detection and GCP trace context propagation, see
`opentelemetry-tools-google-cloud
<https://pypi.org/project/opentelemetry-tools-google-cloud/>`_. For the
Google Cloud Monitoring exporter, see
`opentelemetry-exporter-gcp-monitoring
<https://pypi.org/project/opentelemetry-exporter-gcp-monitoring/>`_.

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

.. code:: bash

    pip install opentelemetry-exporter-gcp-trace

Usage
-----

.. code:: python

    from opentelemetry import trace
    from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import (
        SimpleSpanProcessor,
    )

    trace.set_tracer_provider(TracerProvider())

    cloud_trace_exporter = CloudTraceSpanExporter(
        project_id='my-gcloud-project',
    )
    trace.get_tracer_provider().add_span_processor(
        SimpleSpanProcessor(cloud_trace_exporter)
    )
    tracer = trace.get_tracer(__name__)
    with tracer.start_as_current_span('foo'):
        print('Hello world!')


References
----------

* `Cloud Trace <https://cloud.google.com/trace/>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/tree/main/opentelemetry-exporter-gcp-trace",
    "name": "opentelemetry-exporter-gcp-trace",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Google",
    "author_email": "opentelemetry-pypi@google.com",
    "download_url": "https://files.pythonhosted.org/packages/d6/69/34f50b5fee5e7d4ef573d2789eabb7c878a6fa80763eed74b5dacdfdd6c8/opentelemetry_exporter_gcp_trace-1.7.0.tar.gz",
    "platform": "any",
    "description": "OpenTelemetry Google Cloud Integration\n======================================\n\n.. image:: https://badge.fury.io/py/opentelemetry-exporter-gcp-trace.svg\n    :target: https://badge.fury.io/py/opentelemetry-exporter-gcp-trace\n\n.. image:: https://readthedocs.org/projects/google-cloud-opentelemetry/badge/?version=latest\n    :target: https://google-cloud-opentelemetry.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\nThis library provides support for exporting traces to Google Cloud Trace.\n\nFor resource detection and GCP trace context propagation, see\n`opentelemetry-tools-google-cloud\n<https://pypi.org/project/opentelemetry-tools-google-cloud/>`_. For the\nGoogle Cloud Monitoring exporter, see\n`opentelemetry-exporter-gcp-monitoring\n<https://pypi.org/project/opentelemetry-exporter-gcp-monitoring/>`_.\n\nInstallation\n------------\n\n.. code:: bash\n\n    pip install opentelemetry-exporter-gcp-trace\n\nUsage\n-----\n\n.. code:: python\n\n    from opentelemetry import trace\n    from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter\n    from opentelemetry.sdk.trace import TracerProvider\n    from opentelemetry.sdk.trace.export import (\n        SimpleSpanProcessor,\n    )\n\n    trace.set_tracer_provider(TracerProvider())\n\n    cloud_trace_exporter = CloudTraceSpanExporter(\n        project_id='my-gcloud-project',\n    )\n    trace.get_tracer_provider().add_span_processor(\n        SimpleSpanProcessor(cloud_trace_exporter)\n    )\n    tracer = trace.get_tracer(__name__)\n    with tracer.start_as_current_span('foo'):\n        print('Hello world!')\n\n\nReferences\n----------\n\n* `Cloud Trace <https://cloud.google.com/trace/>`_\n* `OpenTelemetry Project <https://opentelemetry.io/>`_\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Google Cloud Trace exporter for OpenTelemetry",
    "version": "1.7.0",
    "project_urls": {
        "Homepage": "https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/tree/main/opentelemetry-exporter-gcp-trace"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c3024a71ffb531e35b8d30b3cdfff385308d755e5d38b01efb63f8da3a7de6bc",
                "md5": "83f9014a5f98593b094811e87f04af4b",
                "sha256": "6fd66256a0a7feb3d87334ec7981f2a477c63cb6d7696b1bc603f105293b06db"
            },
            "downloads": -1,
            "filename": "opentelemetry_exporter_gcp_trace-1.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "83f9014a5f98593b094811e87f04af4b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 13829,
            "upload_time": "2024-08-27T19:25:48",
            "upload_time_iso_8601": "2024-08-27T19:25:48.851670Z",
            "url": "https://files.pythonhosted.org/packages/c3/02/4a71ffb531e35b8d30b3cdfff385308d755e5d38b01efb63f8da3a7de6bc/opentelemetry_exporter_gcp_trace-1.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d66934f50b5fee5e7d4ef573d2789eabb7c878a6fa80763eed74b5dacdfdd6c8",
                "md5": "adb94502838466a95ee189ead9f2269e",
                "sha256": "2752dacdd3fdbfd73079d5ac58fc68179758e76535690d479de2bfbe03646583"
            },
            "downloads": -1,
            "filename": "opentelemetry_exporter_gcp_trace-1.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "adb94502838466a95ee189ead9f2269e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18405,
            "upload_time": "2024-08-27T19:25:53",
            "upload_time_iso_8601": "2024-08-27T19:25:53.404013Z",
            "url": "https://files.pythonhosted.org/packages/d6/69/34f50b5fee5e7d4ef573d2789eabb7c878a6fa80763eed74b5dacdfdd6c8/opentelemetry_exporter_gcp_trace-1.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-27 19:25:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GoogleCloudPlatform",
    "github_project": "opentelemetry-operations-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "opentelemetry-exporter-gcp-trace"
}
        
Elapsed time: 0.90793s