diff --git a/examples/golang-pgo/grafana-provisioning/datasources/pyroscope.yml b/examples/golang-pgo/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/golang-pgo/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/golang-pgo/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/grafana-agent-auto-instrumentation/ebpf/docker/grafana-provisioning/datasources/pyroscope.yml b/examples/grafana-agent-auto-instrumentation/ebpf/docker/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/grafana-agent-auto-instrumentation/ebpf/docker/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/grafana-agent-auto-instrumentation/ebpf/docker/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/grafana-agent-auto-instrumentation/ebpf/local/grafana-provisioning/datasources/pyroscope.yml b/examples/grafana-agent-auto-instrumentation/ebpf/local/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/grafana-agent-auto-instrumentation/ebpf/local/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/grafana-agent-auto-instrumentation/ebpf/local/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/grafana-agent-auto-instrumentation/java/grafana-provisioning/datasources/pyroscope.yml b/examples/grafana-agent-auto-instrumentation/java/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/grafana-agent-auto-instrumentation/java/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/grafana-agent-auto-instrumentation/java/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/dotnet/fast-slow/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/dotnet/fast-slow/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/dotnet/fast-slow/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/dotnet/fast-slow/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/dotnet/rideshare/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/dotnet/rideshare/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/dotnet/rideshare/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/dotnet/rideshare/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/dotnet/web-new/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/dotnet/web-new/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/dotnet/web-new/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/dotnet/web-new/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/golang-push/rideshare/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/golang-push/rideshare/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/golang-push/rideshare/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/golang-push/rideshare/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/golang-push/simple/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/golang-push/simple/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/golang-push/simple/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/golang-push/simple/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/java/fib/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/java/fib/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/java/fib/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/java/fib/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/java/rideshare/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/java/rideshare/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/java/rideshare/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/java/rideshare/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/java/simple/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/java/simple/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/java/simple/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/java/simple/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/nodejs/express-pull/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/nodejs/express-pull/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/nodejs/express-pull/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/nodejs/express-pull/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/nodejs/express-ts-inline/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/nodejs/express-ts-inline/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/nodejs/express-ts-inline/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/nodejs/express-ts-inline/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/nodejs/express-ts/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/nodejs/express-ts/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/nodejs/express-ts/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/nodejs/express-ts/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/nodejs/express/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/nodejs/express/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/nodejs/express/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/nodejs/express/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/python/rideshare/django/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/python/rideshare/django/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/python/rideshare/django/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/python/rideshare/django/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/python/rideshare/fastapi/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/python/rideshare/fastapi/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/python/rideshare/fastapi/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/python/rideshare/fastapi/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/python/rideshare/flask/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/python/rideshare/flask/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/python/rideshare/flask/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/python/rideshare/flask/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/python/simple/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/python/simple/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/python/simple/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/python/simple/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/ruby/rideshare/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/ruby/rideshare/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/ruby/rideshare/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/ruby/rideshare/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/ruby/rideshare_rails/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/ruby/rideshare_rails/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/ruby/rideshare_rails/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/ruby/rideshare_rails/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/ruby/simple/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/ruby/simple/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/ruby/simple/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/ruby/simple/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/examples/language-sdk-instrumentation/rust/rideshare/grafana-provisioning/datasources/pyroscope.yml b/examples/language-sdk-instrumentation/rust/rideshare/grafana-provisioning/datasources/pyroscope.yml index 6f04d797c8..1ac5fa535b 100644 --- a/examples/language-sdk-instrumentation/rust/rideshare/grafana-provisioning/datasources/pyroscope.yml +++ b/examples/language-sdk-instrumentation/rust/rideshare/grafana-provisioning/datasources/pyroscope.yml @@ -6,7 +6,7 @@ datasources: name: Pyroscope url: http://pyroscope:4040 jsonData: - keepCookies: [GitSession] + keepCookies: [pyroscope_git_session] # Uncomment these if using with Grafana Cloud # basicAuth: true # basicAuthUser: '123456' diff --git a/pkg/embedded/grafana/grafana.go b/pkg/embedded/grafana/grafana.go index 41abde4273..836dcc2cd0 100644 --- a/pkg/embedded/grafana/grafana.go +++ b/pkg/embedded/grafana/grafana.go @@ -220,7 +220,7 @@ func (a *app) provisioningDatasource(_ context.Context) error { "name": "Pyroscope", "url": a.cfg.PyroscopeURL, "jsonData": map[string]interface{}{ - "keepCookies": []string{"GitSession"}, + "keepCookies": []string{"pyroscope_git_session"}, "overridesDefault": true, }, }, diff --git a/pkg/querier/vcs/token.go b/pkg/querier/vcs/token.go index eb80982245..29b5455438 100644 --- a/pkg/querier/vcs/token.go +++ b/pkg/querier/vcs/token.go @@ -20,7 +20,7 @@ import ( ) const ( - sessionCookieName = "GitSession" + sessionCookieName = "pyroscope_git_session" ) type gitSessionTokenCookie struct { diff --git a/pkg/querier/vcs/token_test.go b/pkg/querier/vcs/token_test.go index f1e51b06fb..e52b746a7d 100644 --- a/pkg/querier/vcs/token_test.go +++ b/pkg/querier/vcs/token_test.go @@ -161,7 +161,7 @@ func Test_tokenFromRequest(t *testing.T) { t.Run("token does not exist in request", func(t *testing.T) { githubSessionSecret = []byte("16_byte_key_XXXX") - wantErr := "failed to read cookie GitSession: http: named cookie not present" + wantErr := "failed to read cookie pyroscope_git_session: http: named cookie not present" // The type of request here doesn't matter. req := connect.NewRequest(&vcsv1.GetFileRequest{}) @@ -275,12 +275,12 @@ func Test_tenantIsolation(t *testing.T) { } -func Test_StillCompatbile(t *testing.T) { +func Test_StillCompatible(t *testing.T) { githubSessionSecret = []byte("16_byte_key_XXXX") ctx := newTestContextWithTenantID("tenant_a") req := connect.NewRequest(&vcsv1.GetFileRequest{}) - req.Header().Add("Cookie", "GitSession=eyJtZXRhZGF0YSI6Im12N0d1OHlIanZxdWdQMmF5TnJaYXd1SXNyQXFmUUVIMVhGS1RkejVlZWtob1NRV1JUM3hVZGRuMndUemhQZ05oWktRVkpjcVh5SVJDSnFmTTV3WTJyNmR3R21rZkRhL2FORjhRZ0lJcU1oa1hPbGFEdXNwcFE9PSJ9Cg==") + req.Header().Add("Cookie", "pyroscope_git_session=eyJtZXRhZGF0YSI6Im12N0d1OHlIanZxdWdQMmF5TnJaYXd1SXNyQXFmUUVIMVhGS1RkejVlZWtob1NRV1JUM3hVZGRuMndUemhQZ05oWktRVkpjcVh5SVJDSnFmTTV3WTJyNmR3R21rZkRhL2FORjhRZ0lJcU1oa1hPbGFEdXNwcFE9PSJ9Cg==") realToken, err := tokenFromRequest(ctx, req) require.NoError(t, err)