secureapp-python-agent 26.5.0rc4__tar.gz → 26.5.0rc5__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.
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/.gitlab-ci.yml +1 -10
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/Makefile +0 -5
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/PKG-INFO +3 -143
- secureapp_python_agent-26.5.0rc5/README.md +73 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/pyproject.toml +1 -1
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/secureapp_python_agent.egg-info/PKG-INFO +3 -143
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/secureapp_python_agent.egg-info/SOURCES.txt +1 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/.editorconfig +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/.gitignore +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/.o11y-doctor.yaml +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/.service-manifests/python-agent-component.yaml +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/CODEOWNERS +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/LICENSE +0 -0
- /secureapp_python_agent-26.5.0rc4/README.md → /secureapp_python_agent-26.5.0rc5/README-Developers.md +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/buildAll.sh +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/buildO11y.sh +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/buildPublish.sh +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/benchmarks/__init__.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/benchmarks/benchmark_agent.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/benchmarks/benchmark_dependency_analyzer.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/benchmarks/benchmark_suite.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/benchmarks/conftest.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/compat_test_1.35.0.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/compat_test_1.39.0.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/data/golden-data.csv +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/debug/debug_analyzer.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/debug/utils.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/scripts/check_license.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/scripts/update_deps.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/docker/Dockerfile.agentic-ai +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/docker/Dockerfile.manual +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/docker/Dockerfile.zero-code +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/docker-compose.yml +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/README.md +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/common_flask_utils.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/manual_flask_app.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/requirements.txt +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/zero_code_agentic_ai_app.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/zero_code_flask_app.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/o11y_test_application/otel-collector/splunk-otel-config.yaml +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/o11y_test_application/otel-collector/start-splunk-otel-collector.sh +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/o11y_test_application/requirements.txt +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/o11y_test_application/runit.sh +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/o11y_test_application/test_application.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/otel-collector-config.yml +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/renovate.json +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/setup.cfg +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/sonar-project.properties +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/secureapp_python_agent.egg-info/dependency_links.txt +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/secureapp_python_agent.egg-info/entry_points.txt +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/secureapp_python_agent.egg-info/requires.txt +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/secureapp_python_agent.egg-info/top_level.txt +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/splunk_secureapp_opentelemetry_extension/__init__.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/splunk_secureapp_opentelemetry_extension/agent.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/splunk_secureapp_opentelemetry_extension/dependency_analyzer.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/splunk_secureapp_opentelemetry_extension/environment_variables.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/splunk_secureapp_opentelemetry_extension/py.typed +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/src/splunk_secureapp_opentelemetry_extension/utils.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/__init__.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/test_agent.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/test_dependency_analyzer.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/test_environment_variables.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/test_integration.py +0 -0
- {secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/test_package_import.py +0 -0
|
@@ -77,14 +77,6 @@ build:wheel:
|
|
|
77
77
|
- test:unit # Ensures tests pass with 85% coverage
|
|
78
78
|
<<: *base_setup
|
|
79
79
|
script:
|
|
80
|
-
- |
|
|
81
|
-
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
|
|
82
|
-
gitversion --prefix v bump auto
|
|
83
|
-
eval $(ssh-agent -s)
|
|
84
|
-
go-go tag --skip-ci
|
|
85
|
-
else
|
|
86
|
-
echo "Not on main branch. Skipping main-only steps."
|
|
87
|
-
fi
|
|
88
80
|
- make build
|
|
89
81
|
artifacts:
|
|
90
82
|
paths:
|
|
@@ -118,7 +110,6 @@ publish:test:
|
|
|
118
110
|
when: never
|
|
119
111
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
120
112
|
# pypi - using o11y-gdi set API TOKEN
|
|
121
|
-
# change back - if: $CI_COMMIT_TAG - this is test - to launch
|
|
122
113
|
publish:production:
|
|
123
114
|
<<: *publish_template
|
|
124
115
|
needs:
|
|
@@ -130,7 +121,7 @@ publish:production:
|
|
|
130
121
|
rules:
|
|
131
122
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
132
123
|
when: never
|
|
133
|
-
- if: $
|
|
124
|
+
- if: $CI_COMMIT_TAG
|
|
134
125
|
|
|
135
126
|
# Python version compatibility matrix testing
|
|
136
127
|
test:python-matrix:
|
|
@@ -169,11 +169,6 @@ debug-performance:
|
|
|
169
169
|
@echo "⚡ Running performance analysis..."
|
|
170
170
|
$(PYTHON) dev/debug/debug_analyzer.py --performance
|
|
171
171
|
|
|
172
|
-
# CI/CD Publishing target - called from gitlab - do we still need this? Check this -check this3 -checkthis5
|
|
173
|
-
publish:
|
|
174
|
-
@echo "📦 Publishing package to repository: $(if $(REPOSITORY),$(REPOSITORY),local)..."
|
|
175
|
-
$(PYTHON) -m twine upload dist/* $(if $(REPOSITORY),--repository $(REPOSITORY),--repository local)
|
|
176
|
-
|
|
177
172
|
# CI/CD Publishing target - added to go to real test pypi - config set in .pypirc - called by buildPublish.sh testpypi
|
|
178
173
|
publish_testpypi:
|
|
179
174
|
@echo "📦 Publishing package to repository: testpypi..."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: secureapp-python-agent
|
|
3
|
-
Version: 26.5.
|
|
3
|
+
Version: 26.5.0rc5
|
|
4
4
|
Summary: Splunk SecureApp OpenTelemetry Extension for Python applications
|
|
5
5
|
Author-email: Splunk <support@splunk.com>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -49,23 +49,6 @@ Dynamic: license-file
|
|
|
49
49
|
OpenTelemetry Python extension for integrating Splunk SecureApp with OpenTelemetry.
|
|
50
50
|
This extension monitors runtime dependencies and reports them via OpenTelemetry logs.
|
|
51
51
|
|
|
52
|
-
For more information, please refer to this wiki page: https://confluence.corp.appdynamics.com/spaces/APMJAVA/pages/7999681/SecureApp+For+Python
|
|
53
|
-
|
|
54
|
-
## Quick Start
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# Development setup
|
|
58
|
-
make venv-install
|
|
59
|
-
|
|
60
|
-
# Run tests (single Python version)
|
|
61
|
-
make test
|
|
62
|
-
|
|
63
|
-
# Run tests across all Python versions
|
|
64
|
-
make tox
|
|
65
|
-
|
|
66
|
-
# Run all quality checks
|
|
67
|
-
make all
|
|
68
|
-
```
|
|
69
52
|
|
|
70
53
|
## Installation
|
|
71
54
|
|
|
@@ -73,38 +56,11 @@ make all
|
|
|
73
56
|
# Install from PyPI
|
|
74
57
|
pip install secureapp-python-agent
|
|
75
58
|
|
|
76
|
-
# Install in development mode with dev dependencies
|
|
77
|
-
pip install -e .[dev]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Usage
|
|
81
|
-
|
|
82
|
-
The extension can be used in two ways: zero-configuration instrumentation or
|
|
83
|
-
manual integration.
|
|
84
|
-
|
|
85
|
-
### Zero-Configuration with OpenTelemetry Instrumentation
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
59
|
# Install with OpenTelemetry instrumentation
|
|
89
60
|
pip install secureapp-python-agent opentelemetry-distro[otlp]
|
|
90
61
|
|
|
91
62
|
# Run your application with automatic instrumentation
|
|
92
63
|
opentelemetry-instrument python your_app.py
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Manual Integration
|
|
96
|
-
|
|
97
|
-
```python
|
|
98
|
-
from splunk_secureapp_opentelemetry_extension import start_monitoring, stop_monitoring
|
|
99
|
-
|
|
100
|
-
# Start monitoring at application initialization
|
|
101
|
-
start_monitoring()
|
|
102
|
-
|
|
103
|
-
# ... your application code ...
|
|
104
|
-
|
|
105
|
-
# Optional: Stop monitoring during application shutdown
|
|
106
|
-
stop_monitoring()
|
|
107
|
-
```
|
|
108
64
|
|
|
109
65
|
## Configuration
|
|
110
66
|
|
|
@@ -116,15 +72,7 @@ The extension can be configured using environment variables:
|
|
|
116
72
|
| `OTEL_LOGS_EXPORTER` | `otlp` | Log exporter type: `otlp`, `console`, or `none` |
|
|
117
73
|
| `SPLUNK_SECUREAPP_DEPENDENCY_INITIAL_DELAY` | `60.0` | Initial delay (seconds) before dependency tracking starts |
|
|
118
74
|
| `SPLUNK_SECUREAPP_DEPENDENCY_SCAN_INTERVAL` | `86400` | Interval (seconds) between dependency scans (24 hours) |
|
|
119
|
-
|
|
120
|
-
Example configuration:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
# Configure with environment variables
|
|
124
|
-
export OTEL_LOGS_EXPORTER=console
|
|
125
|
-
export SPLUNK_SECUREAPP_DEPENDENCY_SCAN_INTERVAL=600.0
|
|
126
|
-
opentelemetry-instrument python your_app.py
|
|
127
|
-
```
|
|
75
|
+
| `SPLUNK_SECUREAPP_LOG_LEVEL_INFO | NOTSET | Standard Python Log Levels |
|
|
128
76
|
|
|
129
77
|
## Features
|
|
130
78
|
|
|
@@ -147,17 +95,7 @@ them through OpenTelemetry logs with:
|
|
|
147
95
|
|
|
148
96
|
### OpenTelemetry Versions
|
|
149
97
|
|
|
150
|
-
The extension is compatible with OpenTelemetry versions 1.
|
|
151
|
-
|
|
152
|
-
**Supported and tested range**: `1.27.0` - `<1.40` (tested: 1.27.0, 1.30.0, 1.35.0, 1.38.0, 1.39.0, 1.39.1)
|
|
153
|
-
|
|
154
|
-
The agent automatically adapts to both legacy (pre-1.39) and modern (1.39+) Logs APIs, providing:
|
|
155
|
-
- Seamless compatibility across the tested version range
|
|
156
|
-
- Backward compatibility with OpenTelemetry 1.27.0+
|
|
157
|
-
- No version conflicts with other OpenTelemetry packages requiring 1.39.x
|
|
158
|
-
- Independent upgrade paths for OpenTelemetry and SecureApp agent
|
|
159
|
-
|
|
160
|
-
**Note**: OpenTelemetry 1.39.0 introduced breaking changes to the Logs API. This agent handles both API versions transparently using version-adaptive code.
|
|
98
|
+
The extension is compatible with OpenTelemetry versions 1.39.x plus
|
|
161
99
|
|
|
162
100
|
### Python Versions
|
|
163
101
|
|
|
@@ -179,81 +117,3 @@ The SecureApp agent is designed with minimal performance impact:
|
|
|
179
117
|
- Configurable scan intervals
|
|
180
118
|
- Efficient batch processing for telemetry data
|
|
181
119
|
|
|
182
|
-
## Development
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
make help # Show all available commands
|
|
186
|
-
make venv-install # Setup development environment
|
|
187
|
-
make test # Run tests (current Python)
|
|
188
|
-
make test-cov # Run tests with coverage
|
|
189
|
-
make tox # Run tests across all Python versions
|
|
190
|
-
make lint # Run linting with auto-fix
|
|
191
|
-
make format # Format code
|
|
192
|
-
make typecheck # Type checking
|
|
193
|
-
make build # Build package
|
|
194
|
-
make clean # Clean build artifacts
|
|
195
|
-
make license-check # Check and add license headers
|
|
196
|
-
make update-deps # Update dependencies to latest versions
|
|
197
|
-
make all # Run lint, typecheck, and test
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
## Testing
|
|
201
|
-
|
|
202
|
-
- Supports Python 3.10+
|
|
203
|
-
- All tests must mock expensive operations (e.g., sys.modules scanning, OpenTelemetry exporters)
|
|
204
|
-
- Minimum 85% test coverage required
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
# Quick testing (current Python)
|
|
208
|
-
make test # Basic tests
|
|
209
|
-
make test-cov # With coverage report
|
|
210
|
-
|
|
211
|
-
# Comprehensive testing (all Python versions)
|
|
212
|
-
make tox # Uses tox for multi-version testing
|
|
213
|
-
|
|
214
|
-
# OpenTelemetry compatibility testing
|
|
215
|
-
make test-otel-versions # Test with different OTel versions
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
## Dependency Management
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
# Update all dependencies to latest versions
|
|
222
|
-
make update-deps
|
|
223
|
-
|
|
224
|
-
# After updating, verify compatibility
|
|
225
|
-
make test
|
|
226
|
-
make tox
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Workflow
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
# 1. Daily development (fast feedback)
|
|
233
|
-
make all
|
|
234
|
-
|
|
235
|
-
# 2. Before committing (comprehensive)
|
|
236
|
-
make tox
|
|
237
|
-
|
|
238
|
-
# 3. Dependency updates (monthly)
|
|
239
|
-
make update-deps && make tox
|
|
240
|
-
|
|
241
|
-
# 4. Clean build
|
|
242
|
-
make clean build
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
## Project Structure
|
|
246
|
-
|
|
247
|
-
```
|
|
248
|
-
├── scripts/
|
|
249
|
-
│ ├── check_license.py # License header automation
|
|
250
|
-
│ └── update_deps.py # Dependency update automation
|
|
251
|
-
├── src/splunk_secureapp_opentelemetry_extension/
|
|
252
|
-
│ ├── __init__.py # Package entry point (exposes only public APIs)
|
|
253
|
-
│ ├── agent.py # SecureApp agent implementation
|
|
254
|
-
│ ├── dependency_analyzer.py # Runtime dependency analysis
|
|
255
|
-
│ └── environment_variables.py # Environment variable constants
|
|
256
|
-
├── tests/ # Test suite (all expensive operations mocked)
|
|
257
|
-
├── pyproject.toml # Project configuration
|
|
258
|
-
├── Makefile # Development commands
|
|
259
|
-
└── README.md # This file
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Splunk SecureApp OpenTelemetry Extension
|
|
2
|
+
|
|
3
|
+
OpenTelemetry Python extension for integrating Splunk SecureApp with OpenTelemetry.
|
|
4
|
+
This extension monitors runtime dependencies and reports them via OpenTelemetry logs.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Install from PyPI
|
|
11
|
+
pip install secureapp-python-agent
|
|
12
|
+
|
|
13
|
+
# Install with OpenTelemetry instrumentation
|
|
14
|
+
pip install secureapp-python-agent opentelemetry-distro[otlp]
|
|
15
|
+
|
|
16
|
+
# Run your application with automatic instrumentation
|
|
17
|
+
opentelemetry-instrument python your_app.py
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
The extension can be configured using environment variables:
|
|
22
|
+
|
|
23
|
+
| Environment Variable | Default | Description |
|
|
24
|
+
|---------------------------------------------|---------|-----------------------------------------------------------|
|
|
25
|
+
| `SPLUNK_SECUREAPP_AGENT_ENABLED` | `true` | Enable or disable the agent completely |
|
|
26
|
+
| `OTEL_LOGS_EXPORTER` | `otlp` | Log exporter type: `otlp`, `console`, or `none` |
|
|
27
|
+
| `SPLUNK_SECUREAPP_DEPENDENCY_INITIAL_DELAY` | `60.0` | Initial delay (seconds) before dependency tracking starts |
|
|
28
|
+
| `SPLUNK_SECUREAPP_DEPENDENCY_SCAN_INTERVAL` | `86400` | Interval (seconds) between dependency scans (24 hours) |
|
|
29
|
+
| `SPLUNK_SECUREAPP_LOG_LEVEL_INFO | NOTSET | Standard Python Log Levels |
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
### Runtime Dependency Monitoring
|
|
34
|
+
|
|
35
|
+
The extension monitors third-party Python packages loaded at runtime and reports
|
|
36
|
+
them through OpenTelemetry logs with:
|
|
37
|
+
- Package name and version
|
|
38
|
+
- Import timestamp
|
|
39
|
+
- Standard library exclusion for performance optimization
|
|
40
|
+
- Low overhead (<10MB memory, <100ms startup impact)
|
|
41
|
+
|
|
42
|
+
### OpenTelemetry Integration
|
|
43
|
+
|
|
44
|
+
- Sends dependency data as structured logs via configurable exporters
|
|
45
|
+
- Compatible with the OpenTelemetry Collector and Splunk Observability backends
|
|
46
|
+
- Lightweight implementation with optimized performance
|
|
47
|
+
|
|
48
|
+
## Compatibility
|
|
49
|
+
|
|
50
|
+
### OpenTelemetry Versions
|
|
51
|
+
|
|
52
|
+
The extension is compatible with OpenTelemetry versions 1.39.x plus
|
|
53
|
+
|
|
54
|
+
### Python Versions
|
|
55
|
+
|
|
56
|
+
Supported Python versions:
|
|
57
|
+
- Python 3.10
|
|
58
|
+
- Python 3.11
|
|
59
|
+
- Python 3.12
|
|
60
|
+
- Python 3.13
|
|
61
|
+
- Python 3.14
|
|
62
|
+
|
|
63
|
+
## Performance Considerations
|
|
64
|
+
|
|
65
|
+
The SecureApp agent is designed with minimal performance impact:
|
|
66
|
+
- Startup overhead: <100ms
|
|
67
|
+
- Memory overhead: <10MB
|
|
68
|
+
- Optimizations:
|
|
69
|
+
- Lazy imports for better startup performance
|
|
70
|
+
- Standard library detection to avoid unnecessary scanning
|
|
71
|
+
- Configurable scan intervals
|
|
72
|
+
- Efficient batch processing for telemetry data
|
|
73
|
+
|
|
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
|
|
7
7
|
# Changed dynamic = ["version"] to version = 26.4.0-Dev
|
|
8
8
|
[project]
|
|
9
9
|
name = "secureapp-python-agent"
|
|
10
|
-
version = "26.5.0-
|
|
10
|
+
version = "26.5.0-RC5"
|
|
11
11
|
description = "Splunk SecureApp OpenTelemetry Extension for Python applications"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.10"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: secureapp-python-agent
|
|
3
|
-
Version: 26.5.
|
|
3
|
+
Version: 26.5.0rc5
|
|
4
4
|
Summary: Splunk SecureApp OpenTelemetry Extension for Python applications
|
|
5
5
|
Author-email: Splunk <support@splunk.com>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -49,23 +49,6 @@ Dynamic: license-file
|
|
|
49
49
|
OpenTelemetry Python extension for integrating Splunk SecureApp with OpenTelemetry.
|
|
50
50
|
This extension monitors runtime dependencies and reports them via OpenTelemetry logs.
|
|
51
51
|
|
|
52
|
-
For more information, please refer to this wiki page: https://confluence.corp.appdynamics.com/spaces/APMJAVA/pages/7999681/SecureApp+For+Python
|
|
53
|
-
|
|
54
|
-
## Quick Start
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# Development setup
|
|
58
|
-
make venv-install
|
|
59
|
-
|
|
60
|
-
# Run tests (single Python version)
|
|
61
|
-
make test
|
|
62
|
-
|
|
63
|
-
# Run tests across all Python versions
|
|
64
|
-
make tox
|
|
65
|
-
|
|
66
|
-
# Run all quality checks
|
|
67
|
-
make all
|
|
68
|
-
```
|
|
69
52
|
|
|
70
53
|
## Installation
|
|
71
54
|
|
|
@@ -73,38 +56,11 @@ make all
|
|
|
73
56
|
# Install from PyPI
|
|
74
57
|
pip install secureapp-python-agent
|
|
75
58
|
|
|
76
|
-
# Install in development mode with dev dependencies
|
|
77
|
-
pip install -e .[dev]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Usage
|
|
81
|
-
|
|
82
|
-
The extension can be used in two ways: zero-configuration instrumentation or
|
|
83
|
-
manual integration.
|
|
84
|
-
|
|
85
|
-
### Zero-Configuration with OpenTelemetry Instrumentation
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
59
|
# Install with OpenTelemetry instrumentation
|
|
89
60
|
pip install secureapp-python-agent opentelemetry-distro[otlp]
|
|
90
61
|
|
|
91
62
|
# Run your application with automatic instrumentation
|
|
92
63
|
opentelemetry-instrument python your_app.py
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Manual Integration
|
|
96
|
-
|
|
97
|
-
```python
|
|
98
|
-
from splunk_secureapp_opentelemetry_extension import start_monitoring, stop_monitoring
|
|
99
|
-
|
|
100
|
-
# Start monitoring at application initialization
|
|
101
|
-
start_monitoring()
|
|
102
|
-
|
|
103
|
-
# ... your application code ...
|
|
104
|
-
|
|
105
|
-
# Optional: Stop monitoring during application shutdown
|
|
106
|
-
stop_monitoring()
|
|
107
|
-
```
|
|
108
64
|
|
|
109
65
|
## Configuration
|
|
110
66
|
|
|
@@ -116,15 +72,7 @@ The extension can be configured using environment variables:
|
|
|
116
72
|
| `OTEL_LOGS_EXPORTER` | `otlp` | Log exporter type: `otlp`, `console`, or `none` |
|
|
117
73
|
| `SPLUNK_SECUREAPP_DEPENDENCY_INITIAL_DELAY` | `60.0` | Initial delay (seconds) before dependency tracking starts |
|
|
118
74
|
| `SPLUNK_SECUREAPP_DEPENDENCY_SCAN_INTERVAL` | `86400` | Interval (seconds) between dependency scans (24 hours) |
|
|
119
|
-
|
|
120
|
-
Example configuration:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
# Configure with environment variables
|
|
124
|
-
export OTEL_LOGS_EXPORTER=console
|
|
125
|
-
export SPLUNK_SECUREAPP_DEPENDENCY_SCAN_INTERVAL=600.0
|
|
126
|
-
opentelemetry-instrument python your_app.py
|
|
127
|
-
```
|
|
75
|
+
| `SPLUNK_SECUREAPP_LOG_LEVEL_INFO | NOTSET | Standard Python Log Levels |
|
|
128
76
|
|
|
129
77
|
## Features
|
|
130
78
|
|
|
@@ -147,17 +95,7 @@ them through OpenTelemetry logs with:
|
|
|
147
95
|
|
|
148
96
|
### OpenTelemetry Versions
|
|
149
97
|
|
|
150
|
-
The extension is compatible with OpenTelemetry versions 1.
|
|
151
|
-
|
|
152
|
-
**Supported and tested range**: `1.27.0` - `<1.40` (tested: 1.27.0, 1.30.0, 1.35.0, 1.38.0, 1.39.0, 1.39.1)
|
|
153
|
-
|
|
154
|
-
The agent automatically adapts to both legacy (pre-1.39) and modern (1.39+) Logs APIs, providing:
|
|
155
|
-
- Seamless compatibility across the tested version range
|
|
156
|
-
- Backward compatibility with OpenTelemetry 1.27.0+
|
|
157
|
-
- No version conflicts with other OpenTelemetry packages requiring 1.39.x
|
|
158
|
-
- Independent upgrade paths for OpenTelemetry and SecureApp agent
|
|
159
|
-
|
|
160
|
-
**Note**: OpenTelemetry 1.39.0 introduced breaking changes to the Logs API. This agent handles both API versions transparently using version-adaptive code.
|
|
98
|
+
The extension is compatible with OpenTelemetry versions 1.39.x plus
|
|
161
99
|
|
|
162
100
|
### Python Versions
|
|
163
101
|
|
|
@@ -179,81 +117,3 @@ The SecureApp agent is designed with minimal performance impact:
|
|
|
179
117
|
- Configurable scan intervals
|
|
180
118
|
- Efficient batch processing for telemetry data
|
|
181
119
|
|
|
182
|
-
## Development
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
make help # Show all available commands
|
|
186
|
-
make venv-install # Setup development environment
|
|
187
|
-
make test # Run tests (current Python)
|
|
188
|
-
make test-cov # Run tests with coverage
|
|
189
|
-
make tox # Run tests across all Python versions
|
|
190
|
-
make lint # Run linting with auto-fix
|
|
191
|
-
make format # Format code
|
|
192
|
-
make typecheck # Type checking
|
|
193
|
-
make build # Build package
|
|
194
|
-
make clean # Clean build artifacts
|
|
195
|
-
make license-check # Check and add license headers
|
|
196
|
-
make update-deps # Update dependencies to latest versions
|
|
197
|
-
make all # Run lint, typecheck, and test
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
## Testing
|
|
201
|
-
|
|
202
|
-
- Supports Python 3.10+
|
|
203
|
-
- All tests must mock expensive operations (e.g., sys.modules scanning, OpenTelemetry exporters)
|
|
204
|
-
- Minimum 85% test coverage required
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
# Quick testing (current Python)
|
|
208
|
-
make test # Basic tests
|
|
209
|
-
make test-cov # With coverage report
|
|
210
|
-
|
|
211
|
-
# Comprehensive testing (all Python versions)
|
|
212
|
-
make tox # Uses tox for multi-version testing
|
|
213
|
-
|
|
214
|
-
# OpenTelemetry compatibility testing
|
|
215
|
-
make test-otel-versions # Test with different OTel versions
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
## Dependency Management
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
# Update all dependencies to latest versions
|
|
222
|
-
make update-deps
|
|
223
|
-
|
|
224
|
-
# After updating, verify compatibility
|
|
225
|
-
make test
|
|
226
|
-
make tox
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Workflow
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
# 1. Daily development (fast feedback)
|
|
233
|
-
make all
|
|
234
|
-
|
|
235
|
-
# 2. Before committing (comprehensive)
|
|
236
|
-
make tox
|
|
237
|
-
|
|
238
|
-
# 3. Dependency updates (monthly)
|
|
239
|
-
make update-deps && make tox
|
|
240
|
-
|
|
241
|
-
# 4. Clean build
|
|
242
|
-
make clean build
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
## Project Structure
|
|
246
|
-
|
|
247
|
-
```
|
|
248
|
-
├── scripts/
|
|
249
|
-
│ ├── check_license.py # License header automation
|
|
250
|
-
│ └── update_deps.py # Dependency update automation
|
|
251
|
-
├── src/splunk_secureapp_opentelemetry_extension/
|
|
252
|
-
│ ├── __init__.py # Package entry point (exposes only public APIs)
|
|
253
|
-
│ ├── agent.py # SecureApp agent implementation
|
|
254
|
-
│ ├── dependency_analyzer.py # Runtime dependency analysis
|
|
255
|
-
│ └── environment_variables.py # Environment variable constants
|
|
256
|
-
├── tests/ # Test suite (all expensive operations mocked)
|
|
257
|
-
├── pyproject.toml # Project configuration
|
|
258
|
-
├── Makefile # Development commands
|
|
259
|
-
└── README.md # This file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/secureapp_python_agent-26.5.0rc4/README.md → /secureapp_python_agent-26.5.0rc5/README-Developers.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/benchmarks/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/benchmarks/conftest.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/compat_test_1.35.0.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/compat_test_1.39.0.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/data/golden-data.csv
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/debug/debug_analyzer.py
RENAMED
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/scripts/check_license.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/dev/scripts/update_deps.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/docker/Dockerfile.agentic-ai
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/docker/Dockerfile.manual
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/docker/Dockerfile.zero-code
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/common_flask_utils.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/manual_flask_app.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/examples/requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/o11y_test_application/runit.sh
RENAMED
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/otel-collector-config.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/sonar-project.properties
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/test_integration.py
RENAMED
|
File without changes
|
{secureapp_python_agent-26.5.0rc4 → secureapp_python_agent-26.5.0rc5}/tests/test_package_import.py
RENAMED
|
File without changes
|