-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to match changes to SemanticsConfig.hs
- Loading branch information
1 parent
77b4c5f
commit e6b7fc4
Showing
5 changed files
with
32 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ import qualified Database.MySQL.Base as MySQL | |
import qualified Database.Persist.MySQL as Orig | ||
import Database.Persist.Sql | ||
import qualified OpenTelemetry.Instrumentation.Persistent as Otel | ||
import OpenTelemetry.SemConvStabilityOptIn | ||
import OpenTelemetry.SemanticsConfig | ||
import qualified OpenTelemetry.Trace.Core as Otel | ||
import Text.Read (readMaybe) | ||
|
||
|
@@ -141,11 +141,11 @@ openMySQLConn tp attrs [email protected] {connectUser, connectPort, connectOp | |
, (maybe "net.peer.name" (const "net.sock.peer.addr") (readMaybe connectHost :: Maybe IP), fromString connectHost) | ||
] | ||
|
||
semConvStabilityOptIn <- getSemConvStabilityOptIn | ||
semanticsOptions <- getSemanticsOptions | ||
let attrs' = | ||
case semConvStabilityOptIn of | ||
case httpOption semanticsOptions of | ||
Stable -> addStableAttributes attrs | ||
Both -> addStableAttributes . addOldAttributes $ attrs | ||
StableAndOld -> addStableAttributes . addOldAttributes $ attrs | ||
Old -> addOldAttributes attrs | ||
(conn, backend) <- Orig.openMySQLConn ci logFunc | ||
backend' <- Otel.wrapSqlBackend' tp attrs' backend | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters