File tree Expand file tree Collapse file tree
hooks/openfeature-hooks-opentelemetry
src/openfeature/contrib/hook/opentelemetry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ class Attributes:
88 OTEL_PROVIDER_NAME = "feature_flag.provider.name"
99 OTEL_RESULT_VALUE = "feature_flag.result.value"
1010 OTEL_RESULT_REASON = "feature_flag.result.reason"
11- OTEL_SET_ID = "feature_flag.set.id"
12- OTEL_VERSION = "feature_flag.version"
1311
1412
1513class Metrics :
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def error(
6969 ) -> None :
7070 attributes : dict [str , AttributeValue ] = {
7171 Attributes .OTEL_FLAG_KEY : hook_context .flag_key ,
72- "exception" : str (exception ).lower (),
72+ Attributes . OTEL_ERROR_MESSAGE : str (exception ).lower (),
7373 }
7474 if hook_context .provider_metadata :
7575 attributes [Attributes .OTEL_PROVIDER_NAME ] = (
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ def test_metric_error(mock_get_meter):
177177 {
178178 "feature_flag.key" : "flag_key" ,
179179 "feature_flag.provider.name" : "test-provider" ,
180- "exception " : "flag not found: flag_key" ,
180+ "error.message " : "flag not found: flag_key" ,
181181 },
182182 )
183183 mock_counters ["feature_flag.evaluation.success_total" ].add .assert_not_called ()
You can’t perform that action at this time.
0 commit comments