diff --git a/deploy/Jenkinsfile b/deploy/Jenkinsfile index 429d921..a77ed99 100644 --- a/deploy/Jenkinsfile +++ b/deploy/Jenkinsfile @@ -58,12 +58,13 @@ pipeline { } steps { sh """ + go install github.com/DataDog/orchestrion@latest export GOPROXY=https://goproxy.cn,direct export CGO_ENABLED=0 export GOOS=linux export GOARCH=amd64 - go build -o ${env.APP_NAME} . + orchestrion go build -o ${env.APP_NAME} . """ } } diff --git a/internal/timer/consumer.go b/internal/timer/consumer.go index 8019e76..1ecbd23 100644 --- a/internal/timer/consumer.go +++ b/internal/timer/consumer.go @@ -23,7 +23,7 @@ type TopicQuestionAnswer struct { func startConsumer() { kafka.NewConsumer().Consume("qgdzs.question.answer", func(ctx context.Context, msg *sarama.ConsumerMessage) error { - log.Infof("qgdzs.question.answer: %s", string(msg.Value)) + log.Infof("Kafka topic: qgdzs.question.answer: %s", string(msg.Value)) data := &TopicQuestionAnswer{} if err := json.Unmarshal(msg.Value, &data); err != nil { return utils.ErrorsWrap(err) diff --git a/orchestrion.tool.go b/orchestrion.tool.go new file mode 100644 index 0000000..55f3d0d --- /dev/null +++ b/orchestrion.tool.go @@ -0,0 +1,23 @@ +// This file was created by `orchestrion pin`, and is used to ensure the +// `go.mod` file contains the necessary entries to ensure repeatable builds when +// using `orchestrion`. It is also used to set up which integrations are enabled. + +//go:build tools + +//go:generate go run github.com/DataDog/orchestrion pin -generate + +package tools + +// Imports in this file determine which tracer integrations are enabled in +// orchestrion. New integrations can be automatically discovered by running +// `orchestrion pin` again. You can also manually add new imports here to +// enable additional integrations. When doing so, you can run `orchestrion pin` +// to make sure manually added integrations are valid (i.e, the imported package +// includes a valid `orchestrion.yml` file). +import ( + // Ensures `orchestrion` is present in `go.mod` so that builds are repeatable. + // Do not remove. + _ "github.com/DataDog/orchestrion" // integration + + _ "github.com/DataDog/dd-trace-go/orchestrion/all/v2" // integration +)