Skip to content

Commit

Permalink
feat: support Classic Ingest Keys (#1043)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?

We've now released Ingest Keys, but in order for them to work with
Classic environments properly we need to update the key detection logic.

## Short description of the changes

- upgrades husky to 0.26.0
- updates `types.IsLegacyAPIKey` to use `(husky.otlp).IsClassicApiKey`
  • Loading branch information
jharley authored Mar 7, 2024
1 parent 731657c commit 4558dac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/grafana/pyroscope-go/godeltaprof v0.1.7
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/honeycombio/dynsampler-go v0.6.0
github.com/honeycombio/husky v0.25.1
github.com/honeycombio/husky v0.26.0
github.com/honeycombio/libhoney-go v1.21.0
github.com/jessevdk/go-flags v1.5.0
github.com/json-iterator/go v1.1.12
Expand All @@ -39,7 +39,7 @@ require (
go.opentelemetry.io/proto/otlp v1.1.0
go.uber.org/automaxprocs v1.5.3
golang.org/x/exp v0.0.0-20231127185646-65229373498e
google.golang.org/grpc v1.61.1
google.golang.org/grpc v1.62.0
google.golang.org/protobuf v1.32.0
gopkg.in/alexcesaro/statsd.v2 v2.0.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ github.com/honeycombio/cuckoofilter v0.0.0-20230630225016-cf48793fb7c1 h1:MXRxSU
github.com/honeycombio/cuckoofilter v0.0.0-20230630225016-cf48793fb7c1/go.mod h1:VvArVnXCHeB+tpxMOLWvaoItNHWYEgOx8Lgs1JoS+cI=
github.com/honeycombio/dynsampler-go v0.6.0 h1:fs4mrfeFGU5V+ClwpblFzbWqn4Apb+lKlE7Ja5zL22I=
github.com/honeycombio/dynsampler-go v0.6.0/go.mod h1:pJqWFeoMN3syX74PEvlusieyGBbtIBjmTVjLc3thmK4=
github.com/honeycombio/husky v0.25.1 h1:5fjysSfjcXXYtBpsgIjkLd4oSf+xyvabgrvfOhoef6k=
github.com/honeycombio/husky v0.25.1/go.mod h1:t0eBcATeP38Acksmr0Ayh2gaNUS4FKPOVuhoYNKY9ps=
github.com/honeycombio/husky v0.26.0 h1:nnsMJnGrB/meRix/n9nN40ort0OSMyKJGejdfgENMDA=
github.com/honeycombio/husky v0.26.0/go.mod h1:9TaiPjYyMf2DkKMCkRPErtxiAkvMVtgIC4miUVTxOMg=
github.com/honeycombio/libhoney-go v1.21.0 h1:uiiSfUipFSrmBucKTrwD9Bm4K60kY98p0hVLjtSLseM=
github.com/honeycombio/libhoney-go v1.21.0/go.mod h1:RIaurCpfg5NDWSEV8t3QLcda9dUAiVNyWeHRAaSpN90=
github.com/honeycombio/opentelemetry-proto-go/otlp v0.19.0-compat h1:fMpIzVAl5C260HisnRWV//vfckZIC4qvn656M3VLLOY=
Expand Down Expand Up @@ -170,8 +170,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 h1:
google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:PVreiBMirk8ypES6aw9d4p6iiBNSIfZEBqr3UGoAi2E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk=
google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY=
google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=
google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk=
google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
Expand Down
4 changes: 3 additions & 1 deletion types/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package types
import (
"context"
"time"

huskyotlp "github.com/honeycombio/husky/otlp"
)

const (
Expand Down Expand Up @@ -253,5 +255,5 @@ func (sp *Span) CacheImpact(traceTimeout time.Duration) int {
}

func IsLegacyAPIKey(apiKey string) bool {
return len(apiKey) == 32
return huskyotlp.IsClassicApiKey(apiKey)
}

0 comments on commit 4558dac

Please sign in to comment.