splunk-opentelemetry 2.0.0a2.dev0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. splunk_opentelemetry-2.2.0/.github/CODEOWNERS +9 -0
  2. splunk_opentelemetry-2.2.0/.github/dependabot.yml +25 -0
  3. splunk_opentelemetry-2.0.0a2.dev0/.github/workflows/test.yml → splunk_opentelemetry-2.2.0/.github/workflows/ci-main.yml +5 -5
  4. splunk_opentelemetry-2.2.0/.github/workflows/cla.yml +30 -0
  5. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/.gitlab-ci.yml +14 -0
  6. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/CHANGELOG.md +9 -0
  7. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/PKG-INFO +20 -15
  8. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/README.md +10 -6
  9. splunk_opentelemetry-2.2.0/SECURITY.md +25 -0
  10. splunk_opentelemetry-2.2.0/VERSION_2_RELEASE_NOTES.md +92 -0
  11. splunk_opentelemetry-2.2.0/docker/Dockerfile +13 -0
  12. splunk_opentelemetry-2.2.0/docker/README.md +98 -0
  13. splunk_opentelemetry-2.2.0/docker/common.sh +73 -0
  14. splunk_opentelemetry-2.2.0/docker/example-instrumentation.yaml +14 -0
  15. splunk_opentelemetry-2.2.0/docker/publish-docker-image.sh +32 -0
  16. splunk_opentelemetry-2.2.0/docker/requirements.txt +1 -0
  17. splunk_opentelemetry-2.0.0a2.dev0/examples/splunk_opentelemetry.py → splunk_opentelemetry-2.2.0/examples/trace_example.py +2 -2
  18. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/pyproject.toml +9 -8
  19. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/__about__.py +1 -12
  20. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/distro.py +19 -20
  21. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/env.py +3 -1
  22. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_lib.py +2 -0
  23. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_logging.py +2 -2
  24. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_propagator.py +2 -2
  25. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_trace_loop.py +2 -1
  26. splunk_opentelemetry-2.0.0a2.dev0/RELEASE_NOTES.md +0 -61
  27. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/CODE_OF_CONDUCT.md +0 -0
  28. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/CONTRIBUTING.md +0 -0
  29. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/COPYRIGHT.txt +0 -0
  30. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/LICENSE.txt +0 -0
  31. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/__init__.py +0 -0
  32. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/configurator.py +0 -0
  33. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/profile.py +0 -0
  34. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/profile_pb2.py +0 -0
  35. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/src/splunk_otel/propagator.py +0 -0
  36. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/__init__.py +0 -0
  37. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/fixtures/pb_profile.out.json +0 -0
  38. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/fixtures/stacktraces.in.json +0 -0
  39. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/fixtures/thread_states.in.json +0 -0
  40. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_http.py +0 -0
  41. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_init_otel.py +0 -0
  42. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_profile.py +0 -0
  43. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_sf_token.py +0 -0
  44. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_spec.py +0 -0
  45. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_svcname_unset.py +0 -0
  46. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_sysmetrics_disabled.py +0 -0
  47. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/ott_sysmetrics_enabled.py +0 -0
  48. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/test_distro.py +0 -0
  49. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/test_env.py +0 -0
  50. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/test_profile.py +0 -0
  51. {splunk_opentelemetry-2.0.0a2.dev0 → splunk_opentelemetry-2.2.0}/tests/test_propagator.py +0 -0
@@ -0,0 +1,9 @@
1
+ * @signalfx/gdi-python-maintainers @signalfx/gdi-python-approvers
2
+
3
+ #####################################################
4
+ #
5
+ # Docs reviewers
6
+ #
7
+ #####################################################
8
+
9
+ *.md @signalfx/gdi-docs @signalfx/gdi-python-maintainers @signalfx/gdi-python-approvers
@@ -0,0 +1,25 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: "daily"
7
+ labels:
8
+ - "Skip Changelog"
9
+ - "dependencies"
10
+ - package-ecosystem: "pip"
11
+ directory: /
12
+ schedule:
13
+ interval: "daily"
14
+ labels:
15
+ - "Skip Changelog"
16
+ - "dependencies"
17
+ ignore:
18
+ - dependency-name: "opentelemetry-api"
19
+ - dependency-name: "opentelemetry-sdk"
20
+ - dependency-name: "opentelemetry-propagator-b3"
21
+ - dependency-name: "opentelemetry-exporter-otlp-proto-grpc"
22
+ - dependency-name: "opentelemetry-exporter-otlp-proto-http"
23
+ - dependency-name: "opentelemetry-instrumentation"
24
+ - dependency-name: "opentelemetry-instrumentation-system-metrics"
25
+ - dependency-name: "opentelemetry-semantic-conventions"
@@ -2,9 +2,9 @@ name: test
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [main, v2]
5
+ branches: [main]
6
6
  pull_request:
7
- branches: [main, v2]
7
+ branches: [main]
8
8
 
9
9
  concurrency:
10
10
  group: test-${{ github.head_ref }}
@@ -22,13 +22,13 @@ jobs:
22
22
  fail-fast: false
23
23
  matrix:
24
24
  os: [ubuntu-latest, windows-latest, macos-latest]
25
- python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
25
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
26
26
 
27
27
  steps:
28
- - uses: actions/checkout@v3
28
+ - uses: actions/checkout@v4
29
29
 
30
30
  - name: Set up Python ${{ matrix.python-version }}
31
- uses: actions/setup-python@v4
31
+ uses: actions/setup-python@v5
32
32
  with:
33
33
  python-version: ${{ matrix.python-version }}
34
34
 
@@ -0,0 +1,30 @@
1
+ name: "CLA Assistant"
2
+ on:
3
+ issue_comment:
4
+ types: [created]
5
+ pull_request_target:
6
+ types: [opened, closed, synchronize]
7
+
8
+ permissions:
9
+ actions: write
10
+ contents: read
11
+ pull-requests: write
12
+ statuses: write
13
+
14
+ jobs:
15
+ ContributorLicenseAgreement:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: "CLA Assistant"
19
+ if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
20
+ uses: contributor-assistant/github-action@v2.6.1
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23
+ PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT_CLATOOL }}
24
+ with:
25
+ remote-organization-name: splunk
26
+ remote-repository-name: cla-agreement
27
+ branch: main
28
+ path-to-signatures: signatures/version1/cla.json
29
+ path-to-document: https://github.com/splunk/cla-agreement/blob/main/CLA.md
30
+ allowlist: dependabot[bot]
@@ -10,6 +10,7 @@ stages:
10
10
  - build
11
11
  - sign
12
12
  - deploy
13
+ - post-release
13
14
 
14
15
  build-job:
15
16
  stage: build
@@ -35,6 +36,8 @@ checksum-signing-job:
35
36
  SIGN_TYPE: GPG
36
37
  DOWNLOAD_DIR: dist
37
38
  LOGLEVEL: DEBUG
39
+ only:
40
+ - /^v[0-9]+\.[0-9]+\.[0-9]+.*/
38
41
  artifacts:
39
42
  paths:
40
43
  - dist/
@@ -51,3 +54,14 @@ deploy-job:
51
54
  except:
52
55
  - branches
53
56
 
57
+ publish-docker-image:
58
+ stage: post-release
59
+ image: docker:latest
60
+ services:
61
+ - docker:dind
62
+ variables:
63
+ DOCKER_TLS_CERTDIR: ""
64
+ only:
65
+ - /^v[0-9]+\.[0-9]+\.[0-9]+.*/
66
+ script:
67
+ - ./docker/publish_docker_image.sh "$CI_COMMIT_TAG"
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.2.0 - 2025-04-03
6
+ - Upgrade Otel dependencies to 1.31.1 / 0.52b1
7
+
8
+ ## 2.1.0 - 2025-02-18
9
+ - Upgrade Otel dependencies to 1.30.0 / 0.51b0
10
+
11
+ ## 2.0.0 - 2025-01-28
12
+ - See [VERSION_2_RELEASE_NOTES.md](VERSION_2_RELEASE_NOTES.md)
13
+
5
14
  ## 1.20.0 - 2024-08-08
6
15
  - Upgrade Otel dependencies to 1.26.0 / 0.47b0
7
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splunk-opentelemetry
3
- Version: 2.0.0a2.dev0
3
+ Version: 2.2.0
4
4
  Project-URL: Documentation, https://github.com/signalfx/splunk-otel-python#readme
5
5
  Project-URL: Issues, https://github.com/signalfx/splunk-otel-python/issues
6
6
  Project-URL: Source, https://github.com/signalfx/splunk-otel-python
@@ -13,17 +13,18 @@ Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
16
17
  Classifier: Programming Language :: Python :: Implementation :: CPython
17
18
  Classifier: Programming Language :: Python :: Implementation :: PyPy
18
19
  Requires-Python: >=3.8
19
- Requires-Dist: opentelemetry-api==1.29.0
20
- Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.29.0
21
- Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.29.0
22
- Requires-Dist: opentelemetry-instrumentation-system-metrics==0.50b0
23
- Requires-Dist: opentelemetry-instrumentation==0.50b0
24
- Requires-Dist: opentelemetry-propagator-b3==1.29.0
25
- Requires-Dist: opentelemetry-sdk==1.29.0
26
- Requires-Dist: opentelemetry-semantic-conventions==0.50b0
20
+ Requires-Dist: opentelemetry-api==1.31.1
21
+ Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.31.1
22
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.31.1
23
+ Requires-Dist: opentelemetry-instrumentation-system-metrics==0.52b1
24
+ Requires-Dist: opentelemetry-instrumentation==0.52b1
25
+ Requires-Dist: opentelemetry-propagator-b3==1.31.1
26
+ Requires-Dist: opentelemetry-sdk==1.31.1
27
+ Requires-Dist: opentelemetry-semantic-conventions==0.52b1
27
28
  Description-Content-Type: text/markdown
28
29
 
29
30
  # splunk-opentelemetry
@@ -42,17 +43,14 @@ tracer to capture and export trace spans.
42
43
 
43
44
  This distribution comes with the following defaults:
44
45
 
45
- - [W3C tracecontext](https://www.w3.org/TR/trace-context/) and [W3C baggage](https://www.w3.org/TR/baggage/)
46
- context propagation;
47
- [B3](https://github.com/openzipkin/b3-propagation) can also be
48
- [configured](https://docs.splunk.com/Observability/gdi/get-data-in/application/python/configuration/advanced-python-otel-configuration.html).
49
46
  - [OTLP gRPC exporter](https://opentelemetry-python.readthedocs.io/en/latest/exporter/otlp/otlp.html)
50
47
  configured to send spans to a locally running
51
- [Splunk OpenTelemetry Connector](https://github.com/signalfx/splunk-otel-collector)
48
+ [Splunk OpenTelemetry Collector](https://github.com/signalfx/splunk-otel-collector)
52
49
  (`http://localhost:4317`).
53
50
  - Unlimited default limits for
54
51
  [configuration options](https://docs.splunk.com/Observability/gdi/get-data-in/application/python/configuration/advanced-python-otel-configuration.html)
55
52
  to support full-fidelity traces.
53
+ - Inclusion of [system metrics](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-system-metrics)
56
54
 
57
55
  ## Requirements
58
56
 
@@ -62,7 +60,8 @@ libraries are listed
62
60
 
63
61
  ## Get started
64
62
 
65
- For complete instructions on how to get started with the Splunk Distribution of OpenTelemetry Python, see [Instrument a Python application for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=python.application) in the official documentation.
63
+ For complete instructions on how to get started with the Splunk Distribution of OpenTelemetry Python, see
64
+ [Instrument a Python application for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=python.application) in the official documentation.
66
65
 
67
66
 
68
67
  # License
@@ -71,3 +70,9 @@ The Splunk distribution of OpenTelemetry Python Instrumentation is a
71
70
  distribution of [OpenTelemetry Python](https://github.com/open-telemetry/opentelemetry-python).
72
71
  It is licensed under the terms of the Apache Software License version 2.0.
73
72
  See [the license file](./LICENSE.txt) for more details.
73
+
74
+ # Deprecation
75
+ ℹ️ The Splunk Distribution of OpenTelemetry Python version 1.X is deprecated as of February 28, 2025 and will reach end of
76
+ support on February 28, 2026. Existing customers should consider migrating to Splunk OpenTelemetry Python 2.0 or higher.
77
+ See [Migrate to the Splunk Python 2.0 instrumentation](https://docs.splunk.com/observability/en/gdi/get-data-in/application/python/migration-guide.html#python-migration-guide).
78
+
@@ -14,17 +14,14 @@ tracer to capture and export trace spans.
14
14
 
15
15
  This distribution comes with the following defaults:
16
16
 
17
- - [W3C tracecontext](https://www.w3.org/TR/trace-context/) and [W3C baggage](https://www.w3.org/TR/baggage/)
18
- context propagation;
19
- [B3](https://github.com/openzipkin/b3-propagation) can also be
20
- [configured](https://docs.splunk.com/Observability/gdi/get-data-in/application/python/configuration/advanced-python-otel-configuration.html).
21
17
  - [OTLP gRPC exporter](https://opentelemetry-python.readthedocs.io/en/latest/exporter/otlp/otlp.html)
22
18
  configured to send spans to a locally running
23
- [Splunk OpenTelemetry Connector](https://github.com/signalfx/splunk-otel-collector)
19
+ [Splunk OpenTelemetry Collector](https://github.com/signalfx/splunk-otel-collector)
24
20
  (`http://localhost:4317`).
25
21
  - Unlimited default limits for
26
22
  [configuration options](https://docs.splunk.com/Observability/gdi/get-data-in/application/python/configuration/advanced-python-otel-configuration.html)
27
23
  to support full-fidelity traces.
24
+ - Inclusion of [system metrics](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-system-metrics)
28
25
 
29
26
  ## Requirements
30
27
 
@@ -34,7 +31,8 @@ libraries are listed
34
31
 
35
32
  ## Get started
36
33
 
37
- For complete instructions on how to get started with the Splunk Distribution of OpenTelemetry Python, see [Instrument a Python application for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=python.application) in the official documentation.
34
+ For complete instructions on how to get started with the Splunk Distribution of OpenTelemetry Python, see
35
+ [Instrument a Python application for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=python.application) in the official documentation.
38
36
 
39
37
 
40
38
  # License
@@ -43,3 +41,9 @@ The Splunk distribution of OpenTelemetry Python Instrumentation is a
43
41
  distribution of [OpenTelemetry Python](https://github.com/open-telemetry/opentelemetry-python).
44
42
  It is licensed under the terms of the Apache Software License version 2.0.
45
43
  See [the license file](./LICENSE.txt) for more details.
44
+
45
+ # Deprecation
46
+ ℹ️ The Splunk Distribution of OpenTelemetry Python version 1.X is deprecated as of February 28, 2025 and will reach end of
47
+ support on February 28, 2026. Existing customers should consider migrating to Splunk OpenTelemetry Python 2.0 or higher.
48
+ See [Migrate to the Splunk Python 2.0 instrumentation](https://docs.splunk.com/observability/en/gdi/get-data-in/application/python/migration-guide.html#python-migration-guide).
49
+
@@ -0,0 +1,25 @@
1
+ # Security
2
+
3
+ ## Reporting Security Issues
4
+
5
+ Please *DO NOT* report security vulnerabilities with public GitHub issue
6
+ reports. Please [report security issues here](
7
+ https://www.splunk.com/en_us/product-security/report.html).
8
+
9
+ ## Dependencies
10
+
11
+ This project relies on a variety of external dependencies.
12
+ These dependencies are monitored by
13
+ [Dependabot](https://docs.github.com/en/code-security/supply-chain-security/configuring-dependabot-security-updates).
14
+ Dependencies are [checked
15
+ daily](https://github.com/signalfx/splunk-otel-python/blob/main/.github/dependabot.yml)
16
+ and associated pull requests are opened automatically. Upgrading to the [latest
17
+ release](https://github.com/signalfx/splunk-otel-python/releases)
18
+ is recommended to ensure you have the latest security updates. If a security
19
+ vulnerability is detected for a dependency of this project then either:
20
+
21
+ - You are running an older release
22
+ - A new release with the updates has not been cut yet
23
+ - The updated dependency has not been merged likely due to some breaking change
24
+ (in this case, we will actively work to resolve the issue)
25
+ - The dependency has not released an updated version with the patch
@@ -0,0 +1,92 @@
1
+ # Release Notes for Splunk OTel Python Version 2
2
+
3
+ Summary of changes between Splunk OTel Python major versions 1 and 2.
4
+
5
+ ## Overview
6
+
7
+ Version 2 of the Splunk Distribution of Opentelemetry Python represents a significant rewrite of the distribution,
8
+ including a new build system using Hatch, matching the upstream Opentelemetry Python repository. As the upstream
9
+ repository has become more mature since Splunk OTel Python 1.0 was released, version 2 has adopted
10
+ a smaller footprint, deferring logic and spec compliance to the upstream project, while making vendor-specific features
11
+ available for your convenience to send telemetry to Splunk Observability Cloud.
12
+
13
+ ## API
14
+
15
+ ### Version 1
16
+
17
+ | Function name | Operation | Arguments |
18
+ |-------------------|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
19
+ | `start_metrics()` | Configures metrics (sets up meter provider, SystemMetricsInstrumentor, and otlp exporter) | None |
20
+ | `start_tracing()` | Configures tracing (sets up tracer provider, batch span processor, and exporter) | service_name, span_exporter_factories, access_token, resource_attributes, trace_response_header_enabled |
21
+
22
+ ### Version 2
23
+
24
+ | Function name | Operation | Arguments |
25
+ |----------------------|----------------------------------------|-----------|
26
+ | `init_splunk_otel()` | Initializes tracing, metrics, and logs | None |
27
+
28
+ ## Environment Variables
29
+
30
+ | Variable | Default | Description |
31
+ |--------------------------------------------------|-----------|------------------------------------------------------------------------------------------------------|
32
+ | SPLUNK_ACCESS_TOKEN | | Adds token to requests to enable direct ingest (for skipping the Collector) |
33
+ | SPLUNK_REALM | | Sets the metrics and traces endpoints by realm (e.g. `us1`) and sets the protocol to `http/protobuf` |
34
+ | SPLUNK_PROFILER_ENABLED | false | Configures the Splunk profiler to start polling at startup |
35
+ | SPLUNK_TRACE_RESPONSE_HEADER_ENABLED | true | Configures injection of tracecontext headers into HTTP responses if true |
36
+ | SPLUNK_PROFILER_CALL_STACK_INTERVAL | 1000 | Sets the profiler poll interval, in milliseconds |
37
+ | SPLUNK_PROFILER_LOGS_ENDPOINT | | Sets the OTel logging endpoint, only if profiler is enabled |
38
+ | OTEL_METRICS_EXPORTER | otlp | Sets the metrics exporter |
39
+ | OTEL_TRACES_EXPORTER | otlp | Sets the traces exporter |
40
+ | OTEL_LOGS_EXPORTER | otlp | Sets the logs exporter |
41
+ | OTEL_EXPERIMENTAL_RESOURCE_DETECTORS | host | Configures a host resource detector to set telemetry attributes |
42
+ | OTEL_TRACES_SAMPLER | always_on | Configures the sampler to export all traces |
43
+ | OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED | true | Exports all logs |
44
+ | OTEL_SPAN_LINK_COUNT_LIMIT | 1000 | Sets the maximum allowed span link count |
45
+ | OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT | 12000 | Sets the maximum allowed attribute value size |
46
+ | OTEL_ATTRIBUTE_COUNT_LIMIT | _empty_ | |
47
+ | OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT | _empty_ | |
48
+ | OTEL_SPAN_EVENT_COUNT_LIMIT | _empty_ | |
49
+ | OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT | _empty_ | |
50
+ | OTEL_LINK_ATTRIBUTE_COUNT_LIMIT | _empty_ | |
51
+
52
+ ## Environment Variable Changes Between 1.x and 2.x
53
+
54
+ | Variable | Changes in 2.x |
55
+ |--------------------------------------|---------------------------------------------------------------------------------|
56
+ | OTEL_METRICS_ENABLED | Removed (set `OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=system_metrics` to disable) |
57
+ | OTEL_METRICS_EXPORTER | Overridden in 1.x, configurable in 2.x |
58
+ | OTEL_TRACE_ENABLED | Removed (defaulted to `true`) |
59
+ | OTEL_PYTHON_LOG_CORRELATION | No longer set (previously reformatted logs, adding trace IDs) |
60
+ | OTEL_METRICS_EXPORTER | Added |
61
+ | OTEL_LOGS_EXPORTER | Added |
62
+ | OTEL_EXPERIMENTAL_RESOURCE_DETECTORS | Added |
63
+ | OTEL_TRACES_SAMPLER | Added (previously defaulted to `parentbased_always_on`) |
64
+
65
+ ## Auto-instrumentation
66
+
67
+ Version 1 of Splunk OTel Python supplied a script to run a python application with OTel auto instrumentation. For
68
+ example:
69
+
70
+ `$ splunk-py-trace python myapp.py`
71
+
72
+ In version 2 of Splunk OTel Python, the `splunk-py-trace` command is replaced by `opentelemetry-instrument`, the same
73
+ command supplied by the core OpenTelemetry Python project.
74
+
75
+ | Version | Commands |
76
+ |---------|------------------------------------|
77
+ | 1.x | `splunk-py-trace`, `splk-py-trace` |
78
+ | 2.x | `opentelemetry-instrument` |
79
+
80
+ ## Bootstrap Script
81
+
82
+ Version 1 of Splunk OTel Python supplied a script to install instrumentation libraries based on the packages
83
+ already installed in the current environment. In version 2 the `splunk-py-trace-bootstrap` command is replaced by
84
+ `opentelemetry-bootstrap`, the same command supplied by the core OpenTelemetry Python project.
85
+
86
+ | Version | Commands |
87
+ |---------|--------------------------------------------------------|
88
+ | 1.x | `splunk-py-trace-bootstrap`, `splk-py-trace-bootstrap` |
89
+ | 2.x | `opentelemetry-bootstrap` |
90
+
91
+ > **Note:** `opentelemetry-bootstrap` does not install packages automatically. You need to pass it the `-a install`
92
+ > flag to install them.
@@ -0,0 +1,13 @@
1
+ FROM python:3.11 AS build
2
+
3
+ WORKDIR /operator-build
4
+
5
+ ADD requirements.txt .
6
+
7
+ RUN mkdir workspace && pip install --target workspace -r requirements.txt
8
+
9
+ FROM busybox
10
+
11
+ COPY --from=build /operator-build/workspace /autoinstrumentation
12
+
13
+ RUN chmod -R go+r /autoinstrumentation
@@ -0,0 +1,98 @@
1
+ # Overview
2
+
3
+ This directory contains a Dockerfile and an `example-instrumentation.yaml` file for creating a
4
+ Docker init container that can be used to auto-instrumetation your Python app via the kubernetes
5
+ [OTel Operator](https://github.com/open-telemetry/opentelemetry-operator).
6
+
7
+ # Installation
8
+
9
+ Install [cert manager](https://cert-manager.io/docs/installation/) into your k8s cluster unless already installed.
10
+
11
+ Install the OTel Operator Custom Resource Definitions:
12
+
13
+ ```
14
+ kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
15
+ ```
16
+
17
+ Install an _OpenTelemetryCollector_ definition into the k8s cluster. The following defines a Collector sidecar that
18
+ just prints debug statements.
19
+
20
+ ```yaml
21
+ apiVersion: opentelemetry.io/v1beta1
22
+ kind: OpenTelemetryCollector
23
+ metadata:
24
+ name: my-sidecar
25
+ spec:
26
+ mode: sidecar
27
+ config:
28
+ receivers:
29
+ otlp:
30
+ protocols:
31
+ grpc:
32
+ endpoint: 0.0.0.0:4317
33
+ http:
34
+ endpoint: 0.0.0.0:4318
35
+ exporters:
36
+ debug: {}
37
+ service:
38
+ pipelines:
39
+ traces:
40
+ receivers: [otlp]
41
+ exporters: [debug]
42
+ ```
43
+
44
+ Install an _Instrumentation_ definition. It will be activated when you create an app with an `inject-python` annotation,
45
+ running an _init_ container before your Python app. The init container makes OTel libraries (including a
46
+ `sitecustomize.py`) available at `/otel-auto-instrumentation-python` and sets the PYTHONPATH for the starting
47
+ application.
48
+
49
+
50
+ ```yaml
51
+ apiVersion: opentelemetry.io/v1alpha1
52
+ kind: Instrumentation
53
+ metadata:
54
+ name: splunk-otel-python
55
+ spec:
56
+ exporter:
57
+ endpoint: http://localhost:4318
58
+ sampler:
59
+ type: always_on
60
+ python:
61
+ env:
62
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
63
+ value: http/protobuf
64
+ image: "splunk-otel-python-init:v2.0.0"
65
+
66
+ ```
67
+
68
+ Create an application image and run it via something like this Deployment. Note the annotations, indicating that
69
+ we want both Python auto instrumentation installed and our sidecar Collector to run.
70
+
71
+ ```yaml
72
+ apiVersion: apps/v1
73
+ kind: Deployment
74
+ metadata:
75
+ name: ticker
76
+ spec:
77
+ selector:
78
+ matchLabels:
79
+ app: ticker
80
+ replicas: 1
81
+ template:
82
+ metadata:
83
+ labels:
84
+ app: ticker
85
+ annotations:
86
+ sidecar.opentelemetry.io/inject: "true"
87
+ instrumentation.opentelemetry.io/inject-python: "true"
88
+ spec:
89
+ containers:
90
+ - name: ticker
91
+ image: ticker:v1
92
+ env:
93
+ - name: PYTHONUNBUFFERED
94
+ value: "1"
95
+ ```
96
+
97
+ When you run this application, k8s should create a pod with a Collector sidecar and auto instrumentation enabled. You
98
+ can check the Collector logs to make sure it's receiving data.
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Common functions used during the release process on GitLab
4
+
5
+ set -e
6
+
7
+ setup_gpg() {
8
+ echo ">>> Setting GnuPG configuration ..."
9
+ mkdir -p ~/.gnupg
10
+ chmod 700 ~/.gnupg
11
+ cat > ~/.gnupg/gpg.conf <<EOF
12
+ no-tty
13
+ pinentry-mode loopback
14
+ EOF
15
+ }
16
+
17
+ import_gpg_secret_key() {
18
+ local secret_key_contents="$1"
19
+
20
+ echo ">>> Importing secret key ..."
21
+ echo "$secret_key_contents" > seckey.gpg
22
+ if (gpg --batch --allow-secret-key-import --import seckey.gpg)
23
+ then
24
+ rm seckey.gpg
25
+ else
26
+ rm seckey.gpg
27
+ exit 1
28
+ fi
29
+ }
30
+
31
+ sign_file() {
32
+ local file="$1"
33
+ echo "$GPG_PASSWORD" | \
34
+ gpg --batch --passphrase-fd 0 --armor --local-user="$GPG_KEY_ID" --detach-sign "$file"
35
+ }
36
+
37
+ setup_git() {
38
+ git config --global user.name release-bot
39
+ git config --global user.email ssg-srv-gh-o11y-gdi@splunk.com
40
+ git config --global gpg.program gpg
41
+ git config --global user.signingKey "$GITHUB_BOT_GPG_KEY_ID"
42
+ }
43
+
44
+ # input must include starting 'v'.
45
+ # this strips it and returns version minus leading v.
46
+ get_release_version() {
47
+ local release_tag="$1"
48
+ echo "$release_tag" | cut -c2-
49
+ }
50
+
51
+ # 1 from v1.2.3
52
+ get_major_version() {
53
+ local release_tag="$1"
54
+ get_release_version "$release_tag" | awk -F'.' '{print $1}'
55
+ }
56
+ get_minor_version() {
57
+ local release_tag="$1"
58
+ get_release_version "$release_tag" | awk -F'.' '{print $2}'
59
+ }
60
+ get_patch_version() {
61
+ local release_tag="$1"
62
+ get_release_version "$release_tag" | awk -F'[.-]' '{print $3}'
63
+ }
64
+
65
+ validate_version() {
66
+ local version="$1"
67
+ if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-.*)?$ ]]
68
+ then
69
+ echo "Invalid release version: $version"
70
+ echo "Release version must follow the pattern major.minor.patch, e.g. 1.2.3"
71
+ exit 1
72
+ fi
73
+ }
@@ -0,0 +1,14 @@
1
+ apiVersion: opentelemetry.io/v1alpha1
2
+ kind: Instrumentation
3
+ metadata:
4
+ name: splunk-otel-python
5
+ spec:
6
+ exporter:
7
+ endpoint: http://localhost:4318
8
+ sampler:
9
+ type: always_on
10
+ python:
11
+ env:
12
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
13
+ value: http/protobuf
14
+ image: "splunk-otel-instrumentation-python:v2.1.0"
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ cd docker
5
+
6
+ release_tag="$1" # e.g. v1.2.3
7
+ major_version=$(echo $release_tag | cut -d '.' -f1) # e.g. "v1"
8
+ repo="quay.io/signalfx/splunk-otel-instrumentation-python"
9
+
10
+ build_docker_image() {
11
+ echo ">>> Building the operator docker image ..."
12
+ docker build -t splunk-otel-instrumentation-python .
13
+ docker tag splunk-otel-instrumentation-python ${repo}:latest
14
+ docker tag splunk-otel-instrumentation-python ${repo}:${major_version}
15
+ docker tag splunk-otel-instrumentation-python ${repo}:${release_tag}
16
+ }
17
+
18
+ login_to_quay_io() {
19
+ echo ">>> Logging into quay.io ..."
20
+ docker login -u "$QUAY_USERNAME" -p "$QUAY_PASSWORD" quay.io
21
+ }
22
+
23
+ publish_docker_image() {
24
+ echo ">>> Publishing the operator docker image ..."
25
+ docker push ${repo}:latest
26
+ docker push ${repo}:${major_version}
27
+ docker push ${repo}:${release_tag}
28
+ }
29
+
30
+ build_docker_image
31
+ login_to_quay_io
32
+ publish_docker_image
@@ -0,0 +1 @@
1
+ splunk-opentelemetry==2.1.0
@@ -8,9 +8,9 @@ from splunk_otel.env import SPLUNK_ACCESS_TOKEN, SPLUNK_REALM
8
8
 
9
9
  os.environ[OTEL_SERVICE_NAME] = "my-svc"
10
10
  os.environ[SPLUNK_REALM] = "us1"
11
- os.environ[SPLUNK_ACCESS_TOKEN] = "your-splunk-access-token-here"
11
+ os.environ[SPLUNK_ACCESS_TOKEN] = "abc123"
12
12
 
13
- # The `init_splunk_otel` command sets up Splunk OTel Python. It is equivalent to running `opentelemetry-instrument`.
13
+ # The `init_splunk_otel` function configures OTel metrics, traces, and logs.
14
14
  init_splunk_otel()
15
15
 
16
16
  tracer = trace.get_tracer("my-tracer")
@@ -19,18 +19,19 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3.10",
20
20
  "Programming Language :: Python :: 3.11",
21
21
  "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
22
23
  "Programming Language :: Python :: Implementation :: CPython",
23
24
  "Programming Language :: Python :: Implementation :: PyPy",
24
25
  ]
25
26
  dependencies = [
26
- "opentelemetry-api==1.29.0",
27
- "opentelemetry-sdk==1.29.0",
28
- "opentelemetry-propagator-b3==1.29.0",
29
- "opentelemetry-exporter-otlp-proto-grpc==1.29.0",
30
- "opentelemetry-exporter-otlp-proto-http==1.29.0",
31
- "opentelemetry-instrumentation==0.50b0",
32
- "opentelemetry-instrumentation-system-metrics==0.50b0",
33
- "opentelemetry-semantic-conventions==0.50b0",
27
+ "opentelemetry-api==1.31.1",
28
+ "opentelemetry-sdk==1.31.1",
29
+ "opentelemetry-propagator-b3==1.31.1",
30
+ "opentelemetry-exporter-otlp-proto-grpc==1.31.1",
31
+ "opentelemetry-exporter-otlp-proto-http==1.31.1",
32
+ "opentelemetry-instrumentation==0.52b1",
33
+ "opentelemetry-instrumentation-system-metrics==0.52b1",
34
+ "opentelemetry-semantic-conventions==0.52b1",
34
35
  ]
35
36
 
36
37
  [project.urls]
@@ -13,15 +13,4 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- __version__ = "2.0.0a2.dev0"
17
- """
18
- explanation:
19
- 2.0.0a1 (alpha release 1 of version 2.0.0)
20
- 2.0.0a1.dev0 (development version zero of the next release)
21
- 2.0.0b1 (beta release 1 of version 2.0.0)
22
- 2.0.0rc1 (release candidate 1 of version 2.0.0)
23
-
24
- installation:
25
- pip install --pre splunk-opentelemetry
26
- pip install splunk-opentelemetry==2.0.0a1
27
- """
16
+ __version__ = "2.2.0"
@@ -57,7 +57,6 @@ class SplunkDistro(BaseDistro):
57
57
  def __init__(self):
58
58
  # can't accept an arg here because of the parent class
59
59
  self.env = Env()
60
- self.logger = logging.getLogger(__name__)
61
60
 
62
61
  def _configure(self, **kwargs):
63
62
  self.set_env_defaults()
@@ -68,31 +67,15 @@ class SplunkDistro(BaseDistro):
68
67
  self.configure_token_headers()
69
68
  self.set_server_timing_propagator()
70
69
 
71
- def handle_realm(self):
72
- realm = self.env.getval(SPLUNK_REALM)
73
- if len(realm):
74
- ingest_url = f"https://ingest.{realm}.signalfx.com"
75
- self.env.setdefault(
76
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
77
- f"{ingest_url}/v2/trace/otlp",
78
- )
79
- self.env.setdefault(
80
- OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,
81
- f"{ingest_url}/v2/datapoint/otlp",
82
- )
83
-
84
- # if realm is set, we assume direct ingest and set the protocol to `http/proto`
85
- self.env.setdefault(OTEL_EXPORTER_OTLP_PROTOCOL, "http/protobuf")
70
+ def set_env_defaults(self):
71
+ for key, value in DEFAULTS.items():
72
+ self.env.setdefault(key, value)
86
73
 
87
74
  def check_service_name(self):
88
75
  if not len(self.env.getval(OTEL_SERVICE_NAME)):
89
76
  _pylogger.warning(_NO_SERVICE_NAME_WARNING)
90
77
  self.env.setval(OTEL_SERVICE_NAME, _DEFAULT_SERVICE_NAME)
91
78
 
92
- def set_env_defaults(self):
93
- for key, value in DEFAULTS.items():
94
- self.env.setdefault(key, value)
95
-
96
79
  def set_profiling_env(self):
97
80
  if self.env.is_true(SPLUNK_PROFILER_ENABLED, "false"):
98
81
  logs_endpt = self.env.getval(SPLUNK_PROFILER_LOGS_ENDPOINT)
@@ -103,6 +86,22 @@ class SplunkDistro(BaseDistro):
103
86
  self.env.list_append(OTEL_RESOURCE_ATTRIBUTES, f"telemetry.distro.name={_DISTRO_NAME}")
104
87
  self.env.list_append(OTEL_RESOURCE_ATTRIBUTES, f"telemetry.distro.version={version}")
105
88
 
89
+ def handle_realm(self):
90
+ realm = self.env.getval(SPLUNK_REALM)
91
+ if len(realm):
92
+ ingest_url = f"https://ingest.{realm}.signalfx.com"
93
+ self.env.setdefault(
94
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
95
+ f"{ingest_url}/v2/trace/otlp",
96
+ )
97
+ self.env.setdefault(
98
+ OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,
99
+ f"{ingest_url}/v2/datapoint/otlp",
100
+ )
101
+
102
+ # if realm is set, we assume direct ingest and set the protocol to `http/protobuf`
103
+ self.env.setdefault(OTEL_EXPORTER_OTLP_PROTOCOL, "http/protobuf")
104
+
106
105
  def configure_token_headers(self):
107
106
  tok = self.env.getval(SPLUNK_ACCESS_TOKEN).strip()
108
107
  if tok:
@@ -27,8 +27,10 @@ from opentelemetry.sdk.environment_variables import (
27
27
  OTEL_TRACES_SAMPLER,
28
28
  )
29
29
 
30
+ OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED = "OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED"
31
+
30
32
  DEFAULTS = {
31
- "OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED": "true",
33
+ OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED: "true",
32
34
  OTEL_TRACES_EXPORTER: "otlp",
33
35
  OTEL_METRICS_EXPORTER: "otlp",
34
36
  OTEL_LOGS_EXPORTER: "otlp",
@@ -3,6 +3,8 @@ from pathlib import Path
3
3
 
4
4
  from opentelemetry import trace
5
5
 
6
+ UPSTREAM_PRERELEASE_VERSION = "0.51b0"
7
+
6
8
 
7
9
  def project_path():
8
10
  return str(Path(__file__).parent.parent)
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
 
3
3
  from opentelemetry import trace
4
- from ott_lib import project_path
4
+ from ott_lib import UPSTREAM_PRERELEASE_VERSION, project_path
5
5
 
6
6
  MESSAGE = "uh oh!"
7
7
  LOGGER_NAME = "logging-ott"
@@ -17,7 +17,7 @@ if __name__ == "__main__":
17
17
 
18
18
  class LoggingOtelTest:
19
19
  def requirements(self):
20
- return project_path(), "opentelemetry-instrumentation-logging==0.49b2"
20
+ return project_path(), f"opentelemetry-instrumentation-logging=={UPSTREAM_PRERELEASE_VERSION}"
21
21
 
22
22
  def environment_variables(self):
23
23
  return {
@@ -1,7 +1,7 @@
1
1
  from typing import Mapping, Optional, Sequence
2
2
 
3
3
  from oteltest import OtelTest, Telemetry
4
- from ott_lib import project_path
4
+ from ott_lib import UPSTREAM_PRERELEASE_VERSION, project_path
5
5
 
6
6
  PORT = 8888
7
7
 
@@ -35,7 +35,7 @@ class OTT(OtelTest):
35
35
  project_path(),
36
36
  "oteltest",
37
37
  "flask",
38
- "opentelemetry-instrumentation-flask",
38
+ f"opentelemetry-instrumentation-flask=={UPSTREAM_PRERELEASE_VERSION}",
39
39
  ]
40
40
 
41
41
  def wrapper_command(self) -> str:
@@ -1,4 +1,3 @@
1
- from oteltest.telemetry import count_spans, extract_leaves, get_attribute
2
1
  from ott_lib import project_path, trace_loop
3
2
 
4
3
  NUM_SPANS = 12
@@ -23,6 +22,8 @@ class NumSpansOtelTest:
23
22
  return None
24
23
 
25
24
  def on_stop(self, telemetry, stdout: str, stderr: str, returncode: int) -> None:
25
+ from oteltest.telemetry import count_spans, extract_leaves, get_attribute
26
+
26
27
  assert count_spans(telemetry) == NUM_SPANS
27
28
 
28
29
  attributes = extract_leaves(telemetry, "trace_requests", "pbreq", "resource_spans", "resource", "attributes")
@@ -1,61 +0,0 @@
1
- # Release Notes for Splunk OTel Python Version 2
2
-
3
- Summary of changes between Splunk OTel Python major versions 1 and 2.
4
-
5
- ## API
6
-
7
- ### Version 1
8
-
9
- | Function name | Operation | Arguments |
10
- |-------------------|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
11
- | `start_metrics()` | Configures metrics (sets up meter provider, SystemMetricsInstrumentor, and otlp exporter) | None |
12
- | `start_tracing()` | Configures tracing (sets up tracer provider, batch span processor, and exporter) | service_name, span_exporter_factories, access_token, resource_attributes, trace_response_header_enabled |
13
-
14
- ### Version 2
15
-
16
- | Function name | Operation | Arguments |
17
- |----------------------|----------------------------------------|-----------|
18
- | `init_splunk_otel()` | Initializes tracing, metrics, and logs | None |
19
-
20
- ## Environment Variables
21
-
22
- | Variable | v2 default | v1 -> v2 changes | Description |
23
- |---------------------------------------|------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
24
- | SPLUNK_ACCESS_TOKEN | | None | Adds token to requests to enable direct ingest (for skipping the collector) |
25
- | OTEL_METRICS_ENABLED | [n/a] | Removed. Set `OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=system_metrics` to disable. | Caused metrics to be configured (with an otlp-grpc metric exporter and a SystemMetricInstrumentor) |
26
- | OTEL_METRICS_EXPORTER | otlp | Hard coded in v1, configurable in v2 | Indicates the metrics exporter |
27
- | OTEL_TRACE_ENABLED | true | None | Causes tracing to be configured and instrumentors loaded |
28
- | OTEL_TRACES_EXPORTER | otlp | None | Indicates the traces exporter |
29
- | OTEL_PYTHON_DISABLED_INSTRUMENTATIONS | | None | Disables instrumentations by entrypoint name |
30
- | SPLUNK_PROFILER_ENABLED | false | None | Causes the Splunk profiler to start polling at startup |
31
- | OTEL_SPAN_LINK_COUNT_LIMIT | 1000 | None | Sets the maximum allowed span link count |
32
- | OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT | 12000 | None | Sets the maximum allowed attribute value size |
33
- | SPLUNK_TRACE_RESPONSE_HEADER_ENABLED | true | None | Causes a ServerTimingReponsePropagator to be configured if true (injects tracecontext headers into HTTP responses) |
34
- | OTEL_EXPERIMENTAL_RESOURCE_DETECTORS | host | Not set in v1 | Causes a host resource detector to be configured to set telemetry attributes |
35
- | OTEL_TRACES_SAMPLER | always_on | Not set in v1 (took upstream default of parentbased_always_on) | |
36
-
37
- ## Auto-instrumentation
38
-
39
- Version 1 of Splunk OTel Python supplied a script to run a python application with OTel auto instrumentation. For
40
- example:
41
-
42
- `$ splunk-py-trace python myapp.apy`
43
-
44
- In version 2 of Splunk OTel Python, the `splunk-py-trace` command is replaced by `opentelemetry-instrument`, the same
45
- command supplied by the core OpenTelemetry Python project.
46
-
47
- | Version | Commands |
48
- |---------|------------------------------------|
49
- | 1.x | `splunk-py-trace`, `splk-py-trace` |
50
- | 2.x | `opentelemetry-instrument` |
51
-
52
- ## Bootstrap Script
53
-
54
- Version 1 of Splunk OTel Python supplied a script to install instrumentation libraries based on the packages
55
- already installed in the current environment. In version 2 the `splunk-py-trace-bootstrap` command is replaced by
56
- `opentelemetry-bootstrap`, the same command supplied by the core OpenTelemetry Python project.
57
-
58
- | Version | Commands |
59
- |---------|--------------------------------------------------------|
60
- | 1.x | `splunk-py-trace-bootstrap`, `splk-py-trace-bootstrap` |
61
- | 2.x | `opentelemetry-bootstrap` |