Skip to content

Commit

Permalink
feature: add deployment.environment resource in tracer (#39)
Browse files Browse the repository at this point in the history
* feature: add deployment.environment resource in tracer

* bump: CHANGELOG.md

---------

Co-authored-by: Agung Hariadi Tedja <agung.tedja@kumparan.com>
  • Loading branch information
zhenqianz and Agung Hariadi Tedja authored Oct 14, 2024
1 parent 868ae41 commit 1d36348
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# go-connect

<a name="v1.19.0"></a>
## [v1.19.0] - 2024-10-14
### New Features
- add deployment.environment resource in tracer


<a name="v1.18.2"></a>
## [v1.18.2] - 2024-09-26
### Other Improvements
Expand Down Expand Up @@ -237,7 +243,8 @@
- init go-connect with http and redis connector ([#1](https://github.com/kumparan/go-connect/issues/1))


[Unreleased]: https://github.com/kumparan/go-connect/compare/v1.18.2...HEAD
[Unreleased]: https://github.com/kumparan/go-connect/compare/v1.19.0...HEAD
[v1.19.0]: https://github.com/kumparan/go-connect/compare/v1.18.2...v1.19.0
[v1.18.2]: https://github.com/kumparan/go-connect/compare/v1.18.1...v1.18.2
[v1.18.1]: https://github.com/kumparan/go-connect/compare/v1.18.0...v1.18.1
[v1.18.0]: https://github.com/kumparan/go-connect/compare/v1.17.0...v1.18.0
Expand Down
3 changes: 2 additions & 1 deletion trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

// InitTraceProvider configures an OpenTelemetry exporter and trace provider
func InitTraceProvider(token, collectorURL, serviceName string, traceRatio float64) *sdktrace.TracerProvider {
func InitTraceProvider(token, collectorURL, serviceName, environment string, traceRatio float64) *sdktrace.TracerProvider {
headers := map[string]string{
"signoz-access-token": token,
}
Expand All @@ -36,6 +36,7 @@ func InitTraceProvider(token, collectorURL, serviceName string, traceRatio float
context.Background(),
resource.WithAttributes(
attribute.String("service.name", serviceName),
attribute.String("deployment.environment", environment),
),
)
if err != nil {
Expand Down

0 comments on commit 1d36348

Please sign in to comment.