Commit f91e1ff
committed
fix(o11y): Fully implement metrics attributes according to requirements
This commit ensures that all required metrics attributes for Golden
Signals are fully implemented in sdk-platform-java.
Specifically:
- Always populate `rpc.response.status_code` for both gRPC and HTTP transports.
- Conditionally populate `http.response.status_code` only for HTTP transport.
- Add `error.type` attribute to metrics exclusively on operation failures.
- Ensured all other attributes (`gcp.client.service`, `rpc.system.name`, `rpc.method`, `url.domain`, `url.template`, `server.address`, `server.port`) are consistently populated from `ApiTracerContext.getMetricsAttributes()`.1 parent 4e18407 commit f91e1ff
File tree
3 files changed
+8
-4
lines changed- sdk-platform-java/gax-java/gax/src
- main/java/com/google/api/gax/tracing
- test/java/com/google/api/gax/tracing
3 files changed
+8
-4
lines changedLines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
181 | | - | |
182 | | - | |
183 | 182 | | |
184 | 183 | | |
185 | 184 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
| |||
0 commit comments