File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
opentelemetry-instrumentation/src/opentelemetry/instrumentation Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 15
15
import os
16
16
import threading
17
17
import urllib .parse
18
+ from enum import Enum
18
19
from re import escape , sub
19
20
from typing import Dict , Optional , Sequence
20
21
@@ -205,7 +206,7 @@ class _OpenTelemetryStabilitySignalType:
205
206
HTTP = "http"
206
207
207
208
208
- class _OpenTelemetryStabilityMode :
209
+ class _OpenTelemetryStabilityMode ( Enum ) :
209
210
# http - emit the new, stable HTTP and networking conventions ONLY
210
211
HTTP = "http"
211
212
# http/dup - emit both the old and the stable HTTP and networking conventions
@@ -233,9 +234,12 @@ def _initialize(cls):
233
234
if opt_in_list :
234
235
# Process http opt-in
235
236
# http/dup takes priority over http
236
- if _OpenTelemetryStabilityMode .HTTP_DUP in opt_in_list :
237
+ if (
238
+ _OpenTelemetryStabilityMode .HTTP_DUP .value
239
+ in opt_in_list
240
+ ):
237
241
http_opt_in = _OpenTelemetryStabilityMode .HTTP_DUP
238
- elif _OpenTelemetryStabilityMode .HTTP in opt_in_list :
242
+ elif _OpenTelemetryStabilityMode .HTTP . value in opt_in_list :
239
243
http_opt_in = _OpenTelemetryStabilityMode .HTTP
240
244
_OpenTelemetrySemanticConventionStability ._OTEL_SEMCONV_STABILITY_SIGNAL_MAPPING [
241
245
_OpenTelemetryStabilitySignalType .HTTP
You can’t perform that action at this time.
0 commit comments