Skip to content

Commit

Permalink
[ITOM-75213] - add logger support to libtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh.balla committed Sep 12, 2023
1 parent cae2995 commit be932d4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 615 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v3
- uses: addnab/docker-run-action@v3
with:
image: golang:1.20.4-buster
image: golang:1.21.1-bullseye
options: -v ${{ github.workspace }}:${{ github.workspace }} --env IS_GITHUB_ACTION=true --env VERSION_TAG=${{ github.event.release.tag_name }}
run: |
cd ${{ github.workspace }}
Expand All @@ -34,8 +34,8 @@ jobs:
image: rockylinux:8
options: -v ${{ github.workspace }}:${{ github.workspace }} --env IS_GITHUB_ACTION=true --env VERSION_TAG=${{ github.event.release.tag_name }}
run: |
curl -L -O https://go.dev/dl/go1.20.4.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz
curl -L -O https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
cd ${{ github.workspace }}
PATH=$PATH:/usr/local/go/bin /bin/bash build/vm/tracing-rpm/script.sh
mkdir -p ${{ github.workspace }}/output
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$TARGETPLATFORM golang:1.20.7-bullseye as builder
FROM --platform=$TARGETPLATFORM golang:1.21.1-bullseye as builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
4 changes: 4 additions & 0 deletions cmd/tracing-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func main() {

userAgentAddition := "tracing-proxy/" + CollectorVersion
upstreamClient, err := libtrace.NewClient(libtrace.ClientConfig{
Logger: logrusLogger,
Transmission: &transmission.TraceProxy{
MaxBatchSize: c.GetMaxBatchSize(),
BatchTimeout: c.GetBatchTimeout(),
Expand All @@ -176,6 +177,7 @@ func main() {
MaxInterval: retryConfig.MaxInterval,
MaxElapsedTime: retryConfig.MaxElapsedTime,
},
Logger: logrusLogger,
},
})
if err != nil {
Expand All @@ -184,6 +186,7 @@ func main() {
}

peerClient, err := libtrace.NewClient(libtrace.ClientConfig{
Logger: logrusLogger,
Transmission: &transmission.TraceProxy{
MaxBatchSize: c.GetMaxBatchSize(),
BatchTimeout: c.GetBatchTimeout(),
Expand All @@ -208,6 +211,7 @@ func main() {
MaxInterval: retryConfig.MaxInterval,
MaxElapsedTime: retryConfig.MaxElapsedTime,
},
Logger: logrusLogger,
},
})
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/opsramp/tracing-proxy

go 1.19
go 1.21

require (
github.com/dgryski/go-wyhash v0.0.0-20191203203029-c4841ae36371
Expand All @@ -17,8 +17,8 @@ require (
github.com/jessevdk/go-flags v1.5.0
github.com/json-iterator/go v1.1.12
github.com/klauspost/compress v1.16.7
github.com/opsramp/husky v0.0.0-20230719151104-01eeb1b7e530
github.com/opsramp/libtrace-go v0.0.0-20230719150918-e2ba67c0f350
github.com/opsramp/husky v0.0.0-20230912033521-faf8b3bd52a6
github.com/opsramp/libtrace-go v0.0.0-20230912034011-7a4e29962ea3
github.com/panmari/cuckoofilter v1.0.3
github.com/pelletier/go-toml/v2 v2.0.5
github.com/pkg/errors v0.9.1
Expand All @@ -29,7 +29,7 @@ require (
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/viper v1.13.0
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.3
github.com/tidwall/gjson v1.14.3
github.com/vmihailenco/msgpack/v5 v5.3.5
google.golang.org/grpc v1.56.2
Expand Down Expand Up @@ -60,7 +60,7 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
Expand Down
Loading

0 comments on commit be932d4

Please sign in to comment.