From 3ca853199b89c1c8abc5dd74510662e5717c20b1 Mon Sep 17 00:00:00 2001 From: evanlauer1 Date: Wed, 22 May 2024 11:51:33 -0700 Subject: [PATCH] Updated Haddock to include blurb about the new HTTP semantic conventions --- .../src/OpenTelemetry/Instrumentation/HttpClient.hs | 5 +++++ .../src/OpenTelemetry/Instrumentation/Persistent/MySQL.hs | 8 +++++++- .../src/OpenTelemetry/Instrumentation/PostgresqlSimple.hs | 6 ++++++ .../wai/src/OpenTelemetry/Instrumentation/Wai.hs | 6 ++++++ .../yesod/src/OpenTelemetry/Instrumentation/Yesod.hs | 6 ++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/instrumentation/http-client/src/OpenTelemetry/Instrumentation/HttpClient.hs b/instrumentation/http-client/src/OpenTelemetry/Instrumentation/HttpClient.hs index 40d97e65..21114d34 100644 --- a/instrumentation/http-client/src/OpenTelemetry/Instrumentation/HttpClient.hs +++ b/instrumentation/http-client/src/OpenTelemetry/Instrumentation/HttpClient.hs @@ -6,6 +6,11 @@ - Use internals to instrument a particular callsite using modifyRequest, modifyResponse (Next best) - Provide a middleware to pull from the thread-local state (okay) - Modify the global manager to pull from the thread-local state (least good, can't be helped sometimes) + +[New HTTP semantic conventions have been declared stable.](https://opentelemetry.io/blog/2023/http-conventions-declared-stable/#migration-plan) Opt-in by setting the environment variable OTEL_SEMCONV_STABILITY_OPT_IN to +- "http" - to use the stable conventions +- "http/dup" - to emit both the old and the stable conventions +Otherwise, the old conventions will be used. The stable conventions will replace the old conventions in the next major release of this library. -} module OpenTelemetry.Instrumentation.HttpClient ( withResponse, diff --git a/instrumentation/persistent-mysql/src/OpenTelemetry/Instrumentation/Persistent/MySQL.hs b/instrumentation/persistent-mysql/src/OpenTelemetry/Instrumentation/Persistent/MySQL.hs index 299c80c4..7e0cac6d 100644 --- a/instrumentation/persistent-mysql/src/OpenTelemetry/Instrumentation/Persistent/MySQL.hs +++ b/instrumentation/persistent-mysql/src/OpenTelemetry/Instrumentation/Persistent/MySQL.hs @@ -5,7 +5,13 @@ -- option for module re-export {-# OPTIONS_GHC -Wno-missing-import-lists #-} --- | Wrapper module for @Database.Persist.MySQL@ with @OpenTelemetry.Instrumentation.Persistent@. +{- | Wrapper module for @Database.Persist.MySQL@ with @OpenTelemetry.Instrumentation.Persistent@. + +[New HTTP semantic conventions have been declared stable.](https://opentelemetry.io/blog/2023/http-conventions-declared-stable/#migration-plan) Opt-in by setting the environment variable OTEL_SEMCONV_STABILITY_OPT_IN to +- "http" - to use the stable conventions +- "http/dup" - to emit both the old and the stable conventions +Otherwise, the old conventions will be used. The stable conventions will replace the old conventions in the next major release of this library. +-} module OpenTelemetry.Instrumentation.Persistent.MySQL ( withMySQLPool, withMySQLConn, diff --git a/instrumentation/postgresql-simple/src/OpenTelemetry/Instrumentation/PostgresqlSimple.hs b/instrumentation/postgresql-simple/src/OpenTelemetry/Instrumentation/PostgresqlSimple.hs index e5f67a1f..a4a62edc 100644 --- a/instrumentation/postgresql-simple/src/OpenTelemetry/Instrumentation/PostgresqlSimple.hs +++ b/instrumentation/postgresql-simple/src/OpenTelemetry/Instrumentation/PostgresqlSimple.hs @@ -1,6 +1,12 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} +{- | +[New HTTP semantic conventions have been declared stable.](https://opentelemetry.io/blog/2023/http-conventions-declared-stable/#migration-plan) Opt-in by setting the environment variable OTEL_SEMCONV_STABILITY_OPT_IN to +- "http" - to use the stable conventions +- "http/dup" - to emit both the old and the stable conventions +Otherwise, the old conventions will be used. The stable conventions will replace the old conventions in the next major release of this library. +-} module OpenTelemetry.Instrumentation.PostgresqlSimple ( staticConnectionAttributes, {- diff --git a/instrumentation/wai/src/OpenTelemetry/Instrumentation/Wai.hs b/instrumentation/wai/src/OpenTelemetry/Instrumentation/Wai.hs index 6af92e82..150972ff 100644 --- a/instrumentation/wai/src/OpenTelemetry/Instrumentation/Wai.hs +++ b/instrumentation/wai/src/OpenTelemetry/Instrumentation/Wai.hs @@ -2,6 +2,12 @@ {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} +{- | +[New HTTP semantic conventions have been declared stable.](https://opentelemetry.io/blog/2023/http-conventions-declared-stable/#migration-plan) Opt-in by setting the environment variable OTEL_SEMCONV_STABILITY_OPT_IN to +- "http" - to use the stable conventions +- "http/dup" - to emit both the old and the stable conventions +Otherwise, the old conventions will be used. The stable conventions will replace the old conventions in the next major release of this library. +-} module OpenTelemetry.Instrumentation.Wai ( newOpenTelemetryWaiMiddleware, newOpenTelemetryWaiMiddleware', diff --git a/instrumentation/yesod/src/OpenTelemetry/Instrumentation/Yesod.hs b/instrumentation/yesod/src/OpenTelemetry/Instrumentation/Yesod.hs index 5f1e5f57..04c58ce6 100644 --- a/instrumentation/yesod/src/OpenTelemetry/Instrumentation/Yesod.hs +++ b/instrumentation/yesod/src/OpenTelemetry/Instrumentation/Yesod.hs @@ -4,6 +4,12 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{- | +[New HTTP semantic conventions have been declared stable.](https://opentelemetry.io/blog/2023/http-conventions-declared-stable/#migration-plan) Opt-in by setting the environment variable OTEL_SEMCONV_STABILITY_OPT_IN to +- "http" - to use the stable conventions +- "http/dup" - to emit both the old and the stable conventions +Otherwise, the old conventions will be used. The stable conventions will replace the old conventions in the next major release of this library. +-} module OpenTelemetry.Instrumentation.Yesod ( -- * Middleware functionality openTelemetryYesodMiddleware,