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

Adopt new OpenTelemetry HTTP attribute names #202

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core-webserver-warp/core-webserver-warp.cabal
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.2.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

name: core-webserver-warp
version: 0.2.1.2
version: 0.3.0.0
synopsis: Interoperability with Wai/Warp
description: This is part of a library to help build command-line programs, both tools and
longer-running daemons.
Expand All @@ -24,7 +24,7 @@ license: MIT
license-file: LICENSE
build-type: Simple
tested-with:
GHC == 8.10.7, GHC == 9.2.7, GHC == 9.4.5
GHC == 8.10.7, GHC == 9.2.7, GHC == 9.4.8

source-repository head
type: git
Expand Down
2 changes: 1 addition & 1 deletion core-webserver-warp/lib/Core/Webserver/Router.hs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ makeApplication trie request sendResponse = do
let prefix = intoRope prefix'
let remainder = intoRope remainder'
telemetry
[ metric "request.route" prefix
[ metric "http.request.route" prefix
]

handler prefix remainder request
Expand Down
16 changes: 8 additions & 8 deletions core-webserver-warp/lib/Core/Webserver/Warp.hs
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ loggingMiddleware (context0 :: Context τ) application request sendResponse = do

subProgram context1 $ do
telemetry
[ metric "request.method" method
, metric "request.path" path
, if nullRope query then metric "request.query" () else metric "request.query" query
, metric "response.status_code" code
[ metric "http.request.method" method
, metric "http.request.path" path
, if nullRope query then metric "http.request.query" () else metric "http.request.query" query
, metric "http.response.status_code" code
]

-- actually handle the request
Expand All @@ -227,10 +227,10 @@ loggingMiddleware (context0 :: Context τ) application request sendResponse = do
warn "Trapped internal exception"
debug "e" text
telemetry
[ metric "request.method" method
, metric "request.path" path
, if nullRope query then metric "request.query" () else metric "request.query" query
, metric "response.status_code" code
[ metric "http.request.method" method
, metric "http.request.path" path
, if nullRope query then metric "http.request.query" () else metric "http.request.query" query
, metric "http.response.status_code" code
, metric "error" text
]

Expand Down
4 changes: 2 additions & 2 deletions core-webserver-warp/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: core-webserver-warp
version: 0.2.1.2
version: 0.3.0.0
synopsis: Interoperability with Wai/Warp
description: |
This is part of a library to help build command-line programs, both tools and
Expand All @@ -15,7 +15,7 @@ license-file: LICENSE
author: Andrew Cowie <istathar@gmail.com>
maintainer: Andrew Cowie <istathar@gmail.com>
copyright: © 2021-2023 Athae Eredh Siniath and Others
tested-with: GHC == 8.10.7, GHC == 9.2.7, GHC == 9.4.5
tested-with: GHC == 8.10.7, GHC == 9.2.7, GHC == 9.4.8
category: System
ghc-options: -Wall -Wwarn -fwarn-tabs
github: aesiniath/unbeliever
Expand Down
Loading