From c64c7d2da85c07af8c26bf1db8100c87e6087587 Mon Sep 17 00:00:00 2001 From: Daria Bialobrzeska Date: Fri, 8 Nov 2024 18:13:16 +0100 Subject: [PATCH] Disable maze trace validation until PIPE-7498 is done --- bugsnag_performance.go | 4 ++-- consts.go | 22 +++++++++++----------- delivery.go | 2 +- delivery_test.go | 2 +- features/support/env.rb | 2 ++ 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/bugsnag_performance.go b/bugsnag_performance.go index 73f42b3..cc771e5 100644 --- a/bugsnag_performance.go +++ b/bugsnag_performance.go @@ -91,11 +91,11 @@ func createBugsnagMergedResource() *resource.Resource { Value: attribute.StringValue(Config.AppVersion), }, { - Key: bugsnagTelemetrySDKName, + Key: bugsnagSDKNameAttribute, Value: attribute.StringValue(sdkName), }, { - Key: bugsnagTelemetrySDKVer, + Key: bugsnagSDKVersionAttribute, Value: attribute.StringValue(Version), }, } diff --git a/consts.go b/consts.go index e17dd7d..222bea3 100644 --- a/consts.go +++ b/consts.go @@ -3,15 +3,15 @@ package bugsnagperformance import "time" const ( - samplingAttribute = "bugsnag.sampling.p" - samplingResponseHeader = "Bugsnag-Sampling-Probability" - samplingRequestHeader = "Bugsnag-Span-Sampling" - fetcherRetryInterval = 30 * time.Second - fetcherRefreshInterval = 24 * time.Hour - fetcherRequestBody = `{"resourceSpans": []}` - deploymentEnvAttribute = "deployment.environment" - serviceVersionAttribute = "service.version" - bugsnagTelemetrySDKName = "bugsnag.telemetry.sdk.name" - bugsnagTelemetrySDKVer = "bugsnag.telemetry.sdk.version" - sdkName = "Go Bugsnag Performance SDK" + samplingAttribute = "bugsnag.sampling.p" + samplingResponseHeader = "Bugsnag-Sampling-Probability" + samplingRequestHeader = "Bugsnag-Span-Sampling" + fetcherRetryInterval = 30 * time.Second + fetcherRefreshInterval = 24 * time.Hour + fetcherRequestBody = `{"resourceSpans": []}` + deploymentEnvAttribute = "deployment.environment" + serviceVersionAttribute = "service.version" + bugsnagSDKNameAttribute = "bugsnag.telemetry.sdk.name" + bugsnagSDKVersionAttribute = "bugsnag.telemetry.sdk.version" + sdkName = "Go Bugsnag Performance SDK" ) diff --git a/delivery.go b/delivery.go index 4afb44b..8cb84f6 100644 --- a/delivery.go +++ b/delivery.go @@ -84,7 +84,7 @@ func createDelivery() *delivery { func (d *delivery) send(headers map[string]string, payload []byte) (*http.Response, error) { newHeaders := map[string]string{} - // TODO - add this back when pipeline is prepared to handle it + // TODO - can be restored after https://smartbear.atlassian.net/browse/PIPE-7498 //newHeaders["Bugsnag-Sent-At"] = time.Now().Format(time.RFC3339) // merge constant headers with the headers passed in diff --git a/delivery_test.go b/delivery_test.go index e1b062c..13930d7 100644 --- a/delivery_test.go +++ b/delivery_test.go @@ -80,7 +80,7 @@ func TestHeadersPresentAtSend(t *testing.T) { if r.Header.Get("key1") != "value1" { t.Errorf("Expected header key1 to be value1, got %s", r.Header.Get("key1")) } - // TODO - add this back when pipeline is ready + // TODO - can be restored after https://smartbear.atlassian.net/browse/PIPE-7498 //if r.Header.Get("Bugsnag-Sent-At") == "" { // t.Errorf("Expected header Bugsnag-Sent-At to be present") //} diff --git a/features/support/env.rb b/features/support/env.rb index a255aae..027ff17 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,6 +1,8 @@ Before do # we don't need to send the integrity header Maze.config.enforce_bugsnag_integrity = false + # TODO - can be restored after https://smartbear.atlassian.net/browse/PIPE-7498 + Maze.config.skip_default_validation('trace') $address = nil steps %( When I configure the maze endpoint