Commit dbcef1d
authored
fix: move env mapping from ignore_missing_datadog_fields=true to false block (#724)
## Summary
- Fixes environment mapping logic that created a false choice between
env field mapping and service/operation name mapping
- Moves OTEL deployment.environment → Datadog env field mapping to work
alongside service/operation name mapping when
DD_OTLP_CONFIG_IGNORE_MISSING_DATADOG_FIELDS=false (default)
- Resolves issue where spans show env="none" despite correct OTEL
resource attributes
## Background
Previously, environment mapping from OTEL `deployment.environment` to
Datadog `env` field only worked when
`DD_OTLP_CONFIG_IGNORE_MISSING_DATADOG_FIELDS=true`, but
service/operation name mapping only worked when this flag was false
(default). This created a false choice where users had to choose between
environment mapping OR service/operation name mapping.
## Changes
- Moved environment mapping logic from the
`config.otlp_config_ignore_missing_datadog_fields = true` block to the
`= false` block in `bottlecap/src/otlp/transform.rs`
- Now all OTEL semantic convention mappings work together when the flag
is false (default behavior)
## Test Plan
- [x] All existing tests pass (341 tests via cargo nextest)
- [x] Clippy linting passes
- [x] Code formatting verified
Fixes #7231 parent 1c53127 commit dbcef1d
1 file changed
Lines changed: 34 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
872 | 873 | | |
873 | 874 | | |
874 | 875 | | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
875 | 899 | | |
876 | 900 | | |
877 | 901 | | |
| |||
1014 | 1038 | | |
1015 | 1039 | | |
1016 | 1040 | | |
1017 | | - | |
1018 | | - | |
| 1041 | + | |
| 1042 | + | |
1019 | 1043 | | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
1035 | 1047 | | |
1036 | 1048 | | |
1037 | 1049 | | |
| |||
0 commit comments