Skip to content

Commit

Permalink
Merge branch 'main' into on_by_default_exemplar
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole authored Sep 11, 2024
2 parents ff905a0 + 97ee172 commit ee1db28
Show file tree
Hide file tree
Showing 55 changed files with 246 additions and 289 deletions.
15 changes: 9 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

<!-- Released section -->
<!-- Don't change this section unless doing release -->

## [1.30.0/0.52.0/0.6.0/0.0.9] 2024-09-09

### Added

- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environments in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#5739)
Expand All @@ -22,15 +27,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Fixed

- Fix memory leak in the global `MeterProvider` when identical instruments are repeatedly created. (#5754)
- Fix panic instruments creation when setting meter provider. (#5758)
- Fix panic on instruments creation when setting meter provider. (#5758)
- Fix an issue where `SetMeterProvider` in `go.opentelemetry.io/otel` might miss the delegation for instruments and registries. (#5780)

### Removed

- Drop support for [Go 1.21]. (#5736, #5740)

<!-- Released section -->
<!-- Don't change this section unless doing release -->
- Drop support for [Go 1.21]. (#5736, #5740, #5800)

## [1.29.0/0.51.0/0.5.0] 2024-08-23

Expand Down Expand Up @@ -3083,7 +3085,8 @@ It contains api and sdk for trace and meter.
- CircleCI build CI manifest files.
- CODEOWNERS file to track owners of this project.

[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.29.0...HEAD
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...HEAD
[1.30.0/0.52.0/0.6.0/0.0.9]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.30.0
[1.29.0/0.51.0/0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.29.0
[1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0
[1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0
Expand Down
10 changes: 5 additions & 5 deletions bridge/opencensus/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ go 1.22
require (
github.com/stretchr/testify v1.9.0
go.opencensus.io v0.24.0
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/sdk/metric v1.29.0
go.opentelemetry.io/otel/trace v1.29.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/sdk/metric v1.30.0
go.opentelemetry.io/otel/trace v1.30.0
)

require (
Expand All @@ -18,7 +18,7 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
golang.org/x/sys v0.25.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
12 changes: 6 additions & 6 deletions bridge/opencensus/test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ go 1.22

require (
go.opencensus.io v0.24.0
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/bridge/opencensus v1.29.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/trace v1.29.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/bridge/opencensus v1.30.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/trace v1.30.0
)

require (
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/uuid v1.6.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect
golang.org/x/sys v0.25.0 // indirect
)

Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ package opencensus // import "go.opentelemetry.io/otel/bridge/opencensus"

// Version is the current release version of the opencensus bridge.
func Version() string {
return "1.29.0"
return "1.30.0"
}
6 changes: 3 additions & 3 deletions bridge/opentracing/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ replace go.opentelemetry.io/otel/trace => ../../trace
require (
github.com/opentracing/opentracing-go v1.2.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/trace v1.29.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/trace v1.30.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
10 changes: 5 additions & 5 deletions bridge/opentracing/test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ require (
github.com/opentracing-contrib/go-grpc v0.0.0-20240724223109-9dec25a38fa8
github.com/opentracing/opentracing-go v1.2.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/bridge/opentracing v1.29.0
google.golang.org/grpc v1.66.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/bridge/opentracing v1.30.0
google.golang.org/grpc v1.66.1
)

require (
Expand All @@ -23,8 +23,8 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions bridge/opentracing/test/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM=
google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
20 changes: 10 additions & 10 deletions example/dice/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ go 1.22
require (
go.opentelemetry.io/contrib/bridges/otelslog v0.4.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.5.0
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0
go.opentelemetry.io/otel/log v0.5.0
go.opentelemetry.io/otel/metric v1.29.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/sdk/log v0.5.0
go.opentelemetry.io/otel/sdk/metric v1.29.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.6.0
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.30.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0
go.opentelemetry.io/otel/log v0.6.0
go.opentelemetry.io/otel/metric v1.30.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/sdk/log v0.6.0
go.opentelemetry.io/otel/sdk/metric v1.30.0
)

require (
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
golang.org/x/sys v0.25.0 // indirect
)

Expand Down
31 changes: 31 additions & 0 deletions example/dice/rolldice.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
package main

import (
"fmt"
"io"
"math/rand"
"net/http"
"strconv"

"go.opentelemetry.io/contrib/bridges/otelslog"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
)

Expand All @@ -27,3 +34,27 @@ func init() {
panic(err)
}
}

func rolldice(w http.ResponseWriter, r *http.Request) {
ctx, span := tracer.Start(r.Context(), "roll")
defer span.End()

roll := 1 + rand.Intn(6)

var msg string
if player := r.PathValue("player"); player != "" {
msg = fmt.Sprintf("%s is rolling the dice", player)
} else {
msg = "Anonymous player is rolling the dice"
}
logger.InfoContext(ctx, msg, "result", roll)

rollValueAttr := attribute.Int("roll.value", roll)
span.SetAttributes(rollValueAttr)
rollCnt.Add(ctx, 1, metric.WithAttributes(rollValueAttr))

resp := strconv.Itoa(roll) + "\n"
if _, err := io.WriteString(w, resp); err != nil {
logger.ErrorContext(ctx, "Write failed", "error", err)
}
}
35 changes: 0 additions & 35 deletions example/dice/rolldice_go1.21.go

This file was deleted.

42 changes: 0 additions & 42 deletions example/dice/rolldice_go1.22.go

This file was deleted.

10 changes: 5 additions & 5 deletions example/namedtracer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ replace (

require (
github.com/go-logr/stdr v1.2.2
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/trace v1.29.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/trace v1.30.0
)

require (
github.com/go-logr/logr v1.4.2 // indirect
github.com/google/uuid v1.6.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
golang.org/x/sys v0.25.0 // indirect
)

Expand Down
16 changes: 8 additions & 8 deletions example/opencensus/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ replace (

require (
go.opencensus.io v0.24.0
go.opentelemetry.io/otel v1.29.0
go.opentelemetry.io/otel/bridge/opencensus v1.29.0
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/sdk/metric v1.29.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/bridge/opencensus v1.30.0
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.30.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/sdk/metric v1.30.0
)

require (
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/uuid v1.6.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
golang.org/x/sys v0.25.0 // indirect
)

Expand Down
2 changes: 1 addition & 1 deletion example/otel-collector/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

services:
otel-collector:
image: otel/opentelemetry-collector-contrib:0.108.0
image: otel/opentelemetry-collector-contrib:0.109.0
command: ["--config=/etc/otel-collector.yaml"]
volumes:
- ./otel-collector.yaml:/etc/otel-collector.yaml
Expand Down
Loading

0 comments on commit ee1db28

Please sign in to comment.