From 9de48645c14ca41bbf8334f5428379a90624105a Mon Sep 17 00:00:00 2001 From: Jamie Danielson Date: Thu, 30 Mar 2023 06:40:26 -0400 Subject: [PATCH] rel: prep beta release 0.1.2b0 (#112) ## Which problem is this PR solving? - lack of a published beta package ## Short description of the changes - update version in `pyproject.toml` to 0.1.0b0 - add notes in `CHANGELOG.md` for beta release - small cleanup throughout (typos, formatting, etc to clear up squigglies from my editor) --------- Co-authored-by: Mike Goldsmith Co-authored-by: Robb Kidd --- CHANGELOG.md | 11 ++++++++++ DEVELOPING.md | 5 +++-- README.md | 12 ++++++----- examples/README.md | 21 ++++++++++--------- examples/hello-world-flask/README.md | 13 ++++++------ examples/hello-world/README.md | 3 +-- pyproject.toml | 2 +- src/honeycomb/opentelemetry/local_exporter.py | 2 +- src/honeycomb/opentelemetry/sampler.py | 4 ++-- tests/test_metrics.py | 2 +- 10 files changed, 45 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eb01bf..e3ee93d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # honeycomb-opentelemetry-python changelog +## [0.1.2b0] - 2023-03-29 + +Initial beta release of Honeycomb's OpenTelemetry distribution for Python! + +### Maintenance + +- ci: require smoke tests for publish steps (#107) | [@pkanal](https://github.com/pkanal) +- maint: drop poetry locks from example apps (#111) | [@JamieDanielson](https://github.com/JamieDanielson) +- maint: add tests for auto instrumentation (#110) | [@JamieDanielson](https://github.com/JamieDanielson) +- maint(deps-dev): bump coverage from 6.5.0 to 7.2.1 (#104) + ## [0.1.1a3] - 2023-03-07 ### Enhancements diff --git a/DEVELOPING.md b/DEVELOPING.md index a4f9687..b467f73 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -18,7 +18,8 @@ make build ``` ## Examples -Check out the [Example Application overview](/examples/). + +Check out the [Example Application overview](/examples/). Note: Changes to python files in `src/honeycomb/opentelemetry` should propagate to the example applications upon save. Changes in the honeycomb.opentelemetry's pyproject.toml may need a `poetry build` to take effect in the example applications. @@ -54,7 +55,7 @@ make smoke-sdk # or specify a single protocol like with http or grpc: make smoke-sdk-grpc -# To tidy up afer a test run, use: +# To tidy up after a test run, use: make unsmoke ``` diff --git a/README.md b/README.md index 3bc36e2..2452580 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,22 @@ # Honeycomb OpenTelemetry Distro for Python - [![OSS Lifecycle](https://img.shields.io/osslifecycle/honeycombio/honeycomb-opentelemetry-python)](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md) [![CircleCI](https://circleci.com/gh/honeycombio/honeycomb-opentelemetry-python.svg?style=shield)](https://circleci.com/gh/honeycombio/honeycomb-opentelemetry-python) -This is Honeycomb's Distribution of OpenTelemetry for python. +This is Honeycomb's Distribution of OpenTelemetry for Python. It makes getting started with OpenTelemetry and Honeycomb easier! +Latest release built with: + +- [OpenTelemetry version 1.16.0/0.37b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.16.0) + ## Requirements -* Python 3.7 or higher +- Python 3.7 or higher ## Getting Started -Honeycomb's Distribution of OpenTelemetry for python allows you to streamline configuration and to instrument as quickly and easily as possible. +Honeycomb's Distribution of OpenTelemetry for Python allows you to streamline configuration and to instrument as quickly and easily as possible. - [Documentation](https://docs.honeycomb.io/getting-data-in/opentelemetry/python/) - [Examples](/examples/) @@ -30,4 +33,3 @@ Honeycomb's Distribution of OpenTelemetry for python allows you to streamline co ## License [Apache 2.0 License](./LICENSE). - diff --git a/examples/README.md b/examples/README.md index ca064f3..98a56a0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,21 +3,23 @@ ## [Hello World Flask](hello-world-flask/) This example configures the distro using the `opentelemetry_instrument` command, and contains examples of: + - configuring the distro with environment variables - - sending metrics with OpenTelemetry using a counter - - using baggage with context tokens - - manually passing baggage with context - - setting a span attribute - +- sending metrics with OpenTelemetry using a counter +- using baggage with context tokens +- manually passing baggage with context +- setting a span attribute + Check out the [Hello-World-Flask Readme](hello-world-flask/README.md) for setting this up! ## [Hello World Python](hello-world/) This example configures the distro using the `configure_opentelemetry()` function, and contains examples of: - - configuring the distro with a combination of parameters and set environment variables - - sending metrics with OpenTelemetry using a counter - - using baggage with context tokens - - setting a span attribute + +- configuring the distro with a combination of in-code parameters and environment variables +- sending metrics with OpenTelemetry using a counter +- using baggage with context tokens +- setting a span attribute Check out the [Hello-World Readme](hello-world/README.md) for setting this up! @@ -32,4 +34,3 @@ Because each example uses the same port, either comment out the other apps in th ```bash cd smoke-tests && docker-compose up --build app-sdk-grpc ``` - diff --git a/examples/hello-world-flask/README.md b/examples/hello-world-flask/README.md index 5b6b380..f29de0c 100644 --- a/examples/hello-world-flask/README.md +++ b/examples/hello-world-flask/README.md @@ -1,12 +1,13 @@ # hello-world-flask -This simple Flask app that returns "Hello World". This app configures OpenTelemetry to send data to Honeycomb using the `opentelemetry_instrument` command and environment variables. +This simple Flask app that returns "Hello World". This app configures OpenTelemetry to send data to Honeycomb using the `opentelemetry_instrument` command and environment variables. It also contains examples of: - - sending metrics with OpenTelemetry using a counter - - using baggage with context tokens - - manually passing baggage with context - - setting a span attribute + +- sending metrics with OpenTelemetry using a counter +- using baggage with context tokens +- manually passing baggage with context +- setting a span attribute If you are looking for an example using the `configure_opentelemetry()` function and parameters, check out [hello-world app](../hello-world/README.md). @@ -53,4 +54,4 @@ To enable metrics, you will need to set a metrics dataset: `HONEYCOMB_METRICS_DATASET=otel-python-example-metrics` You can configure exporter protocol with this flag: -`OTEL_EXPORTER_OTLP_PROTOCOL=grpc` or `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf` \ No newline at end of file +`OTEL_EXPORTER_OTLP_PROTOCOL=grpc` or `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf` diff --git a/examples/hello-world/README.md b/examples/hello-world/README.md index fb5c1d4..3cafc2f 100644 --- a/examples/hello-world/README.md +++ b/examples/hello-world/README.md @@ -24,7 +24,7 @@ The app will output `Hello World` and then exit. ## Distro Instrumentation Example -This app uses configuration in code parameters rather than stricly commandline and environment variables. +This app uses configuration in code parameters rather than strictly command-line and environment variables. You can also use environment variables as parameters like below: ```python @@ -47,4 +47,3 @@ HONEYCOMB_API_KEY="your-api-key" poetry run python3 app.py You can configure exporter protocol with this flag: `OTEL_EXPORTER_OTLP_PROTOCOL=grpc` or `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf` - diff --git a/pyproject.toml b/pyproject.toml index 4a79d79..551394a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "honeycomb-opentelemetry" -version = "0.1.1a3" +version = "0.1.2b0" description = "Honeycomb OpenTelemetry Distro for Python" authors = ["Honeycomb "] readme = "README.md" diff --git a/src/honeycomb/opentelemetry/local_exporter.py b/src/honeycomb/opentelemetry/local_exporter.py index 895e49e..0aa60b4 100644 --- a/src/honeycomb/opentelemetry/local_exporter.py +++ b/src/honeycomb/opentelemetry/local_exporter.py @@ -18,7 +18,7 @@ def configure_local_exporter(options: HoneycombOptions): direct web links for completed traces in Honeycomb on stdout. Args: - options (HoneycombOptions): the HoneycombOptins used to configure + options (HoneycombOptions): the HoneycombOptions used to configure the exporter Returns: diff --git a/src/honeycomb/opentelemetry/sampler.py b/src/honeycomb/opentelemetry/sampler.py index 9838d4b..4645857 100644 --- a/src/honeycomb/opentelemetry/sampler.py +++ b/src/honeycomb/opentelemetry/sampler.py @@ -31,7 +31,7 @@ def configure_sampler( sampling decision. Args: - options (HoneycombOptions): the HoneycombOptins containing + options (HoneycombOptions): the HoneycombOptions containing sample_rate used to configure the deterministic sampler. Returns: @@ -65,7 +65,7 @@ def __init__(self, rate: int): self._sampler = ALWAYS_ON else: - # Sampler that samples probabalistically based on rate.. + # Sampler that samples probabilistically based on rate.. ratio = 1.0 / self.rate self._sampler = TraceIdRatioBased(ratio) diff --git a/tests/test_metrics.py b/tests/test_metrics.py index dea2a24..57671ef 100644 --- a/tests/test_metrics.py +++ b/tests/test_metrics.py @@ -13,7 +13,7 @@ def test_returns_meter_provider(): assert len(meter_provider._sdk_config.metric_readers) == 1 -def test_setting_debug_addings_console_exporter(): +def test_setting_debug_adds_console_exporter(): options = HoneycombOptions(debug=True) resource = create_resource(options) meter_provider = create_meter_provider(options, resource)