Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Otel semantic convention stability opt-in #1987

Merged
merged 12 commits into from
Nov 10, 2023
Prev Previous commit
Next Next commit
Using enum
  • Loading branch information
jeremydvoss committed Oct 17, 2023
commit fb34c86b8636c403846b82a1e7bb1df071caf525
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
jeremydvoss marked this conversation as resolved.
Show resolved Hide resolved
HTTP = "http"
# http/dup - emit both the old and the stable HTTP and networking conventions
Expand Down Expand Up @@ -191,9 +192,9 @@ 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
Loading