%global _empty_manifest_terminate_build 0 Name: python-azure-core-tracing-opencensus Version: 1.0.0b8 Release: 1 Summary: Microsoft Azure Azure Core Opencensus plugin Library for Python License: MIT License URL: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core-tracing-opencensus Source0: https://mirrors.nju.edu.cn/pypi/web/packages/64/9d/c910fecf8ef52cc335b27b12b8a17b999ce1ca5dd18376d5351510f1fc98/azure-core-tracing-opencensus-1.0.0b8.zip BuildArch: noarch Requires: python3-opencensus Requires: python3-opencensus-ext-azure Requires: python3-opencensus-ext-threading Requires: python3-azure-core Requires: python3-typing %description # Azure Core Tracing OpenCensus client library for Python ## Getting started Install the opencensus python for Python with [pip](https://pypi.org/project/pip/): ```bash pip install azure-core-tracing-opencensus --pre ``` Now you can use opencensus for Python as usual with any SDKs that is compatible with azure-core tracing. This includes (not exhaustive list), azure-storage-blob, azure-keyvault-secrets, azure-eventhub, etc. ## Key concepts * You don't need to pass any context, SDK will get it for you * The opencensus threading plugin is installed with this package ## Examples There is no explicit context to pass, you just create your usual opencensus and tracer and call any SDK code that is compatible with azure-core tracing. This is an example using Azure Monitor exporter, but you can use any exporter (Zipkin, etc.). ```python from opencensus.ext.azure.trace_exporter import AzureExporter from opencensus.trace.tracer import Tracer from opencensus.trace.samplers import AlwaysOnSampler from azure.storage.blob import BlobServiceClient exporter = AzureExporter( instrumentation_key="uuid of the instrumentation key (see your Azure Monitor account)" ) tracer = Tracer(exporter=exporter, sampler=AlwaysOnSampler()) with tracer.span(name="MyApplication") as span: client = BlobServiceClient.from_connection_string('connectionstring') client.delete_container('mycontainer') # Call will be traced ``` ## Troubleshooting This client raises exceptions defined in [Azure Core](https://docs.microsoft.com/python/api/azure-core/azure.core.exceptions?view=azure-python). ## Next steps More documentation on OpenCensus configuration can be found on the [OpenCensus website](https://opencensus.io) ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # Release History ## 1.0.0b8 (2021-07-01) - Fix for supporting `kind` keyword while instantiating the span. ## 1.0.0b7 (2021-04-08) - `Link` and `SpanKind` can now be added while creating the span instance. ## 1.0.0b6 (2020-05-04) - `link` and `link_from_headers` now accept attributes. ## 1.0.0b5 (2019-01-14) ### Bugfix - Fix context passing for multi-threading - Don't fail on unknown span type, but maps to PRODUCER or UNSPECIFIED ### Features - Implement new "change_context" API ## 1.0.0b4 (2019-10-07) ### Features - Opencensus implementation of azure-core tracing protocol %package -n python3-azure-core-tracing-opencensus Summary: Microsoft Azure Azure Core Opencensus plugin Library for Python Provides: python-azure-core-tracing-opencensus BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-azure-core-tracing-opencensus # Azure Core Tracing OpenCensus client library for Python ## Getting started Install the opencensus python for Python with [pip](https://pypi.org/project/pip/): ```bash pip install azure-core-tracing-opencensus --pre ``` Now you can use opencensus for Python as usual with any SDKs that is compatible with azure-core tracing. This includes (not exhaustive list), azure-storage-blob, azure-keyvault-secrets, azure-eventhub, etc. ## Key concepts * You don't need to pass any context, SDK will get it for you * The opencensus threading plugin is installed with this package ## Examples There is no explicit context to pass, you just create your usual opencensus and tracer and call any SDK code that is compatible with azure-core tracing. This is an example using Azure Monitor exporter, but you can use any exporter (Zipkin, etc.). ```python from opencensus.ext.azure.trace_exporter import AzureExporter from opencensus.trace.tracer import Tracer from opencensus.trace.samplers import AlwaysOnSampler from azure.storage.blob import BlobServiceClient exporter = AzureExporter( instrumentation_key="uuid of the instrumentation key (see your Azure Monitor account)" ) tracer = Tracer(exporter=exporter, sampler=AlwaysOnSampler()) with tracer.span(name="MyApplication") as span: client = BlobServiceClient.from_connection_string('connectionstring') client.delete_container('mycontainer') # Call will be traced ``` ## Troubleshooting This client raises exceptions defined in [Azure Core](https://docs.microsoft.com/python/api/azure-core/azure.core.exceptions?view=azure-python). ## Next steps More documentation on OpenCensus configuration can be found on the [OpenCensus website](https://opencensus.io) ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # Release History ## 1.0.0b8 (2021-07-01) - Fix for supporting `kind` keyword while instantiating the span. ## 1.0.0b7 (2021-04-08) - `Link` and `SpanKind` can now be added while creating the span instance. ## 1.0.0b6 (2020-05-04) - `link` and `link_from_headers` now accept attributes. ## 1.0.0b5 (2019-01-14) ### Bugfix - Fix context passing for multi-threading - Don't fail on unknown span type, but maps to PRODUCER or UNSPECIFIED ### Features - Implement new "change_context" API ## 1.0.0b4 (2019-10-07) ### Features - Opencensus implementation of azure-core tracing protocol %package help Summary: Development documents and examples for azure-core-tracing-opencensus Provides: python3-azure-core-tracing-opencensus-doc %description help # Azure Core Tracing OpenCensus client library for Python ## Getting started Install the opencensus python for Python with [pip](https://pypi.org/project/pip/): ```bash pip install azure-core-tracing-opencensus --pre ``` Now you can use opencensus for Python as usual with any SDKs that is compatible with azure-core tracing. This includes (not exhaustive list), azure-storage-blob, azure-keyvault-secrets, azure-eventhub, etc. ## Key concepts * You don't need to pass any context, SDK will get it for you * The opencensus threading plugin is installed with this package ## Examples There is no explicit context to pass, you just create your usual opencensus and tracer and call any SDK code that is compatible with azure-core tracing. This is an example using Azure Monitor exporter, but you can use any exporter (Zipkin, etc.). ```python from opencensus.ext.azure.trace_exporter import AzureExporter from opencensus.trace.tracer import Tracer from opencensus.trace.samplers import AlwaysOnSampler from azure.storage.blob import BlobServiceClient exporter = AzureExporter( instrumentation_key="uuid of the instrumentation key (see your Azure Monitor account)" ) tracer = Tracer(exporter=exporter, sampler=AlwaysOnSampler()) with tracer.span(name="MyApplication") as span: client = BlobServiceClient.from_connection_string('connectionstring') client.delete_container('mycontainer') # Call will be traced ``` ## Troubleshooting This client raises exceptions defined in [Azure Core](https://docs.microsoft.com/python/api/azure-core/azure.core.exceptions?view=azure-python). ## Next steps More documentation on OpenCensus configuration can be found on the [OpenCensus website](https://opencensus.io) ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # Release History ## 1.0.0b8 (2021-07-01) - Fix for supporting `kind` keyword while instantiating the span. ## 1.0.0b7 (2021-04-08) - `Link` and `SpanKind` can now be added while creating the span instance. ## 1.0.0b6 (2020-05-04) - `link` and `link_from_headers` now accept attributes. ## 1.0.0b5 (2019-01-14) ### Bugfix - Fix context passing for multi-threading - Don't fail on unknown span type, but maps to PRODUCER or UNSPECIFIED ### Features - Implement new "change_context" API ## 1.0.0b4 (2019-10-07) ### Features - Opencensus implementation of azure-core tracing protocol %prep %autosetup -n azure-core-tracing-opencensus-1.0.0b8 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-azure-core-tracing-opencensus -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 1.0.0b8-1 - Package Spec generated