Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…contrib into sem
  • Loading branch information
lzchen committed Nov 7, 2023
2 parents 50f0ea2 + edfa99e commit 706b22a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import os
import threading
import urllib.parse
from enum import Enum
from re import escape, sub
from typing import Dict, Sequence

Expand Down Expand Up @@ -163,7 +164,7 @@ class _OpenTelemetryStabilitySignalType:
HTTP = "http"


class _OpenTelemetryStabilityMode:
class _OpenTelemetryStabilityMode(Enum):
# http - emit the new, stable HTTP and networking conventions ONLY
HTTP = "http"
# http/dup - emit both the old and the stable HTTP and networking conventions
Expand Down Expand Up @@ -191,9 +192,12 @@ def _initialize(cls):
if opt_in_list:
# Process http opt-in
# http/dup takes priority over http
if _OpenTelemetryStabilityMode.HTTP_DUP in opt_in_list:
if (
_OpenTelemetryStabilityMode.HTTP_DUP.value
in opt_in_list
):
http_opt_in = _OpenTelemetryStabilityMode.HTTP_DUP
elif _OpenTelemetryStabilityMode.HTTP in opt_in_list:
elif _OpenTelemetryStabilityMode.HTTP.value in opt_in_list:
http_opt_in = _OpenTelemetryStabilityMode.HTTP
_OpenTelemetrySemanticConventionStability._OTEL_SEMCONV_STABILITY_SIGNAL_MAPPING[
_OpenTelemetryStabilitySignalType.HTTP
Expand Down

0 comments on commit 706b22a

Please sign in to comment.