Skip to content

Commit

Permalink
Hook version of hedis instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkun61 committed Mar 15, 2024
1 parent 7066a40 commit 6e09e30
Show file tree
Hide file tree
Showing 11 changed files with 202 additions and 634 deletions.
4 changes: 3 additions & 1 deletion api/src/OpenTelemetry/Attributes/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
Module : OpenTelemetry.Attributes.Key
Copyright : (c) Kazuki Okamoto (岡本和樹), 2023
License : BSD-3
Description : Key-value pair metadata used in 'OpenTelemetry.Trace.Span's, 'OpenTelemetry.Trace.Link's, and 'OpenTelemetry.Trace.Event's
Description : Key-value pair keys used in 'OpenTelemetry.Trace.Span's, 'OpenTelemetry.Trace.Link's, and 'OpenTelemetry.Trace.Event's
Maintainer : Kazuki Okamoto (岡本和樹)
Stability : experimental
Portability : non-portable (GHC extensions)
This module is based on OpenTelemetry Semantic Conventions 1.24.0.
-}
module OpenTelemetry.Attributes.Key (
Key (..),
Expand Down
6 changes: 6 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ packages:
, examples/aws-s3
, examples/grpc-echo
, examples/hdbc-mysql
, examples/hedis
, examples/http-server
, examples/yesod-minimal
, examples/yesod-subsite
Expand Down Expand Up @@ -74,6 +75,11 @@ source-repository-package
location: https://github.com/herp-inc/herp-logger
tag: v0.3

source-repository-package
type: git
location: https://github.com/kakkun61/hedis
tag: 60313d0c76392f7a00467d40c40fa5e851e0ce11

allow-newer:
http-api-data:base
, postgresql-simple:base
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ services:
ports:
- "3306:3306"

redis:
image: redis
ports:
- "6379:6379"

localstack:
image: localstack/localstack:s3-latest
ports:
Expand Down
3 changes: 3 additions & 0 deletions hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ cradle:
- path: "examples/hdbc-mysql/main.hs"
component: "hdbc-mysql-example:exe:hdbc-mysql-example"

- path: "examples/hedis/client.hs"
component: "hedis-example:exe:hedis-client"

- path: "examples/http-server/main.hs"
component: "http-server:exe:http-server"

Expand Down
25 changes: 7 additions & 18 deletions instrumentation/hedis/hs-opentelemetry-instrumentation-hedis.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: hs-opentelemetry-instrumentation-hedis
version: 0.0.0.0
author: Kazuki Okamoto (岡本和樹)
maintainer: kazuki.okamoto@herp.co.jp
extra-source-files: functions.txt

common common
build-depends: base >= 4 && < 5
Expand All @@ -13,29 +12,19 @@ common common
ghc-options: -Wcompat
default-language: Haskell2010

custom-setup
setup-depends:
base,
Cabal,
directory,
filepath

library
import: common
hs-source-dirs: src, gen
hs-source-dirs: src
exposed-modules: OpenTelemetry.Instrumentation.Hedis
other-modules: OpenTelemetry.Instrumentation.Hedis.Internal.Action
OpenTelemetry.Instrumentation.Hedis.Internal.Wrapper
autogen-modules: OpenTelemetry.Instrumentation.Hedis.Internal.Action
other-modules:
Paths_hs_opentelemetry_instrumentation_hedis
autogen-modules:
Paths_hs_opentelemetry_instrumentation_hedis
build-depends: hs-opentelemetry-api,
hs-opentelemetry-semantic-conventions,
hedis >= 0.14,
bytestring,
iproute,
mtl,
safe-exceptions,
text,
unliftio-core,
unordered-containers
text
ghc-options: -Wcompat
-Wno-name-shadowing
if impl(ghc >= 6.4)
Expand Down
Loading

0 comments on commit 6e09e30

Please sign in to comment.