Commit 06929bc
authored
fix(UNTRACKED): support
## Problem
When `OTEL_TRACES_EXPORTER=none` or `OTEL_METRICS_EXPORTER=none` is set,
plugin pods crash on startup with:
### Real-world scenario
In in-vpc or single-node clusters, you might notice this issue in plugin
pods (created by the job-execution-operator) when you set those
environment variables in the `JOB_ENV_VARS` block.
https://github.com/Unstructured-IO/platform-applications-cd/blob/9cf7335f3fe620106c61da208c12d44539d743bc/apps/dataplane/etl-operator/values.yaml#L52
```
NotImplementedError: none implementation not supported yet
```
**Root cause:** The code splits the env var by comma but doesn't filter
"none", then tries to initialize exporters for it, hitting the
`NotImplementedError` in `_add_trace_exporter()` and
`_get_metrics_reader()`.
## Solution
### 1. Filter "none" from exporter lists (lines 33, 37)
```python
trace_exporters = [e for e in trace_exporters if e != "none"]
metric_exporters = [e for e in metric_exporters if e != "none"]
```
### 2. Return None when no exporters configured (lines 45-49, 59-63)
```python
def get_trace_provider() -> TracerProvider | None:
settings = get_settings()
if not settings["trace_exporters"]:
return None # Let OTEL SDK use default no-op
...
```
## Compatibility
`FastAPIInstrumentor.instrument_app()` explicitly supports `None` values
for `tracer_provider` and `meter_provider` parameters (defaults to
None). When None, OTEL SDK uses its built-in no-op providers.
## Testing
**Before:** Plugin crashes with `NotImplementedError`
**After:** Plugin starts successfully with telemetry disabled
## Changes
- Filter "none" from OTEL_TRACES_EXPORTER and OTEL_METRICS_EXPORTER env
vars
- Return None from get_trace_provider/get_metric_provider when exporters
list empty
- Bump version 0.0.41 → 0.0.42
- Update CHANGELOG.md
## Deployment
1. After merge, we need to rebuild platform-plugins images (auto-picks
latest version)
2. Cut a new platform release"none" value for OTEL exporters to disable telemetry (#64)1 parent 56f376b commit 06929bc
File tree
4 files changed
+83
-3
lines changed- test
- unstructured_platform_plugins
- etl_uvicorn
4 files changed
+83
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | | - | |
| 58 | + | |
54 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
0 commit comments