diff --git a/go.mod b/go.mod index 27f1ddc9..00de2290 100644 --- a/go.mod +++ b/go.mod @@ -75,7 +75,7 @@ require ( github.com/modelcontextprotocol/go-sdk v1.8.0 github.com/openvaultdb/openvaultdb-go v0.26.3 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c - github.com/posthog/posthog-go v1.24.3 + github.com/posthog/posthog-go/v2 v2.0.0 github.com/redis/go-redis/v9 v9.7.3 github.com/shopspring/decimal v1.4.0 github.com/sijms/go-ora/v3 v3.0.1 diff --git a/go.sum b/go.sum index 16c15934..8dc05d45 100644 --- a/go.sum +++ b/go.sum @@ -410,8 +410,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posthog/posthog-go v1.24.3 h1:EMWkrhXODtjFI7lUCxS4gzkNe/zaFeeS2oyS06MvfTo= -github.com/posthog/posthog-go v1.24.3/go.mod h1:seY9mmw3mYGT9i2Wr5Dn3JXWPiAkZ6aolwH/5l8eVQE= +github.com/posthog/posthog-go/v2 v2.0.0 h1:HK8qbRQ9Hcb5bdKSZqkrUYz0gKgLeAXZ6HEzbGa5cCw= +github.com/posthog/posthog-go/v2 v2.0.0/go.mod h1:uDmMhWSfIQB1M5xC9cU/smQjdt9HD0s6MbxdWC2beYI= github.com/qri-io/jsonpointer v0.1.1 h1:prVZBZLL6TW5vsSB9fFHFAMBLI4b0ri5vribQlTJiBA= github.com/qri-io/jsonpointer v0.1.1/go.mod h1:DnJPaYgiKu56EuDp8TU5wFLdZIcAnb/uH9v37ZaMV64= github.com/qri-io/jsonschema v0.2.1 h1:NNFoKms+kut6ABPf6xiKNM5214jzxAhDBrPHCJ97Wg0= diff --git a/hermetic_testmain_test.go b/hermetic_testmain_test.go index eb979865..735c809b 100644 --- a/hermetic_testmain_test.go +++ b/hermetic_testmain_test.go @@ -7,7 +7,7 @@ import ( "github.com/datatug/datatug-cli/internal/hermetictest" "github.com/datatug/datatug-cli/pkg/dtlog" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" ) // TestMain keeps every test in this package from reading or writing the diff --git a/main_test.go b/main_test.go index 96829cf1..25d78ee4 100644 --- a/main_test.go +++ b/main_test.go @@ -12,7 +12,7 @@ import ( "charm.land/fang/v2" "charm.land/lipgloss/v2" "github.com/datatug/datatug-cli/apps/datatugapp/commands" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" ) diff --git a/pkg/dtlog/posthog.go b/pkg/dtlog/posthog.go index 603a28b4..5dca788c 100644 --- a/pkg/dtlog/posthog.go +++ b/pkg/dtlog/posthog.go @@ -11,7 +11,7 @@ import ( "time" "github.com/google/uuid" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/strongo/logus" "github.com/strongo/random" "gopkg.in/yaml.v3" diff --git a/pkg/dtlog/posthog_coverage_test.go b/pkg/dtlog/posthog_coverage_test.go index 861bf748..654fa5b3 100644 --- a/pkg/dtlog/posthog_coverage_test.go +++ b/pkg/dtlog/posthog_coverage_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/dtlog/posthog_test.go b/pkg/dtlog/posthog_test.go index 090283ab..9ff2d160 100644 --- a/pkg/dtlog/posthog_test.go +++ b/pkg/dtlog/posthog_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/stretchr/testify/assert" ) diff --git a/pkg/dtlog/telemetry.go b/pkg/dtlog/telemetry.go index 9b2fc30e..491bdc32 100644 --- a/pkg/dtlog/telemetry.go +++ b/pkg/dtlog/telemetry.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/strongo/logus" ) diff --git a/pkg/dtlog/telemetry_test.go b/pkg/dtlog/telemetry_test.go index 820a6a79..f6ab9ba8 100644 --- a/pkg/dtlog/telemetry_test.go +++ b/pkg/dtlog/telemetry_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -368,7 +368,7 @@ func TestNoOtherPackageImportsPostHog(t *testing.T) { checked++ for _, imp := range f.Imports { p, _ := strconv.Unquote(imp.Path.Value) - assert.False(t, strings.HasPrefix(p, "github.com/posthog/posthog-go"), "%s imports PostHog: send through pkg/dtlog so the opt-out applies", path) + assert.False(t, strings.HasPrefix(p, "github.com/posthog/posthog-go/v2"), "%s imports PostHog: send through pkg/dtlog so the opt-out applies", path) } return nil }) @@ -697,7 +697,7 @@ func wire(t *testing.T, msg posthog.Message) (top map[string]any, props map[stri return top, props } -// The fields the SDK (posthog-go v1.24.3) may put on a stack frame and on a +// The fields the SDK (posthog-go v2.0.0) may put on a stack frame and on a // debug image. Each is a code position, an address or a build identifier; none // holds a path, a host name or a process id. var ( @@ -741,7 +741,7 @@ func prepareFixture(t *testing.T) { // What every event carries: set by this package ($session_*) and by the SDK. // The SDK client adds two constants on top when it sends: $geoip_disable and // $is_server. -var commonProps = []string{"$go_version", "$lib", "$lib_version", "$os", "$session_duration", "$session_id", "$session_start_time"} +var commonProps = []string{"$lib", "$lib_version", "$session_duration", "$session_id", "$session_start_time"} func TestWire_StartedAndExited(t *testing.T) { prepareFixture(t) diff --git a/telemetry_main_test.go b/telemetry_main_test.go index 885beb72..fb233bb9 100644 --- a/telemetry_main_test.go +++ b/telemetry_main_test.go @@ -11,7 +11,7 @@ import ( "charm.land/fang/v2" "github.com/datatug/datatug-cli/pkg/dtlog" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/telemetry_result_files_test.go b/telemetry_result_files_test.go index 90b2a4d2..0fac48ff 100644 --- a/telemetry_result_files_test.go +++ b/telemetry_result_files_test.go @@ -8,7 +8,7 @@ import ( "charm.land/fang/v2" "github.com/datatug/datatug-cli/apps/datatugapp/commands" - "github.com/posthog/posthog-go" + "github.com/posthog/posthog-go/v2" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require"