Skip to content

Commit

Permalink
Add support for OTEL_SERVICE_NAME
Browse files Browse the repository at this point in the history
Also upgraded Otel dependency to 1.2.0
  • Loading branch information
owais committed May 12, 2021
1 parent 8fcdd94 commit bff81da
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 86 deletions.
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@

- Added `resource_attributes` config option to the `splunk_otel.start_tracing()` function.
[#57](https://github.com/signalfx/splunk-otel-python/pull/57)
- Added support for `OTEL_SERVICE_NAME`.
[#64](https://github.com/signalfx/splunk-otel-python/pull/64)

### Removed

- Removed `service_name` config option from the `splunk_otel.start_tracing()` function.
Please pass `resource_attributes={'service.name': 'my-service-name'}` to the function instead.
[#57](https://github.com/signalfx/splunk-otel-python/pull/57)
- Removed support for `SPLUNK_SERVICE_NAME` environment variable.
Please use `OTEL_RESOURCE_ATTRIBTES=service.name=<my-service-name>` instead.
- Deprecated support for `SPLUNK_SERVICE_NAME` environment variable.
Please use `OTEL_SERVICE_NAME=<my-service-name>` instead.
[#57](https://github.com/signalfx/splunk-otel-python/pull/57)
- Removed `opentelemetry-propagator-b3` as a depedency. It can be installed direclty or by using
the new `b3` extras options e.g, `pip install splunk-opentelemetry[b3]`.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Splunk distribution of OpenTelemetry Python

[![OpenTelemetry Python Version](https://img.shields.io/badge/otel-1.1.0-blueviolet?style=for-the-badge)](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.1.0)
[![OpenTelemetry Python Version](https://img.shields.io/badge/otel-1.2.0-blueviolet?style=for-the-badge)](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.2.0)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/signalfx/splunk-otel-python?style=for-the-badge)](https://github.com/signalfx/splunk-otel-python/releases)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/splunk-opentelemetry?style=for-the-badge)](https://pypi.org/project/splunk-opentelemetry/)
[![CircleCI](https://img.shields.io/circleci/build/github/signalfx/splunk-otel-python/main?style=for-the-badge)](https://circleci.com/gh/signalfx/splunk-otel-python)
Expand Down Expand Up @@ -61,7 +61,7 @@ Then the runtime parameters should be updated to:
```
$ pip install splunk-opentelemetry
$ splk-py-trace-bootstrap
$ OTEL_RESOURCE_ATTRIBUTES=service.name=my-python-app \
$ OTEL_SERVICE_NAME=my-python-app \
splk-py-trace python main.py --port=8000
```

Expand Down Expand Up @@ -102,6 +102,7 @@ To see the Python instrumentation in action with sample applications, see our

| Environment variable | Config Option | Default value | Notes |
| ----------------------------- | ------------------------------------ | ------------------------------------ | ---------------------------------------------------------------------- |
| OTEL_SERVICE_NAME | service_name | `unnamed-python-service` | The service name of this Python application. |
| OTEL_EXPORTER_JAEGER_ENDPOINT | endpoint | `http://localhost:9080/v1/trace` | The jaeger endpoint to connect to. Currently only HTTP is supported. |
| SPLUNK_ACCESS_TOKEN | access_token | | The optional organization access token for trace submission requests. |
| SPLUNK_MAX_ATTR_LENGTH | max_attr_length | 1200 | Maximum length of string attribute value in characters. Longer values are truncated. |
Expand Down
111 changes: 67 additions & 44 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ splunk_distro = "splunk_otel.distro:SplunkDistro"

[tool.poetry.dependencies]
python = "^3.6"
opentelemetry-api = "^1.1.0"
opentelemetry-sdk = "^1.1.0"
opentelemetry-exporter-jaeger-thrift = "^1.1.0"
opentelemetry-instrumentation = "0.20b0"
opentelemetry-propagator-b3 = {version = "^1.1.0", optional = true}
opentelemetry-api = "^1.2.0"
opentelemetry-sdk = "^1.2.0"
opentelemetry-exporter-jaeger-thrift = "^1.2.0"
opentelemetry-instrumentation = "0.21b0"
opentelemetry-propagator-b3 = {version = "^1.2.0", optional = true}

[tool.poetry.extras]
b3 = ["opentelemetry-propagator-b3"]
Expand Down
Loading

0 comments on commit bff81da

Please sign in to comment.