From 7237e7f659faed69387d894db966396189387a8f Mon Sep 17 00:00:00 2001 From: Nicholas Hulston Date: Mon, 7 Oct 2024 16:14:05 -0400 Subject: [PATCH] * Mark integrations imported * Add copyright comments --- .../aws/aws-sdk-go-v2/aws/eventbridge/eventbridge.go | 12 ++++++++++++ .../aws/eventbridge/eventbridge_test.go | 5 +++++ contrib/aws/aws-sdk-go-v2/aws/sns/sns.go | 12 ++++++++++++ contrib/aws/aws-sdk-go-v2/aws/sns/sns_test.go | 5 +++++ contrib/aws/aws-sdk-go-v2/aws/sqs/sqs.go | 12 ++++++++++++ contrib/aws/aws-sdk-go-v2/aws/sqs/sqs_test.go | 5 +++++ 6 files changed, 51 insertions(+) diff --git a/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge.go b/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge.go index f65cb4f503..27c8866a60 100644 --- a/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge.go +++ b/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge.go @@ -1,3 +1,8 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016 Datadog, Inc. + package eventbridge import ( @@ -9,17 +14,24 @@ import ( "github.com/aws/smithy-go/middleware" "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" "gopkg.in/DataDog/dd-trace-go.v1/internal/log" + "gopkg.in/DataDog/dd-trace-go.v1/internal/telemetry" "strconv" "time" ) const ( + componentName = "aws/aws-sdk-go-v2/aws/eventbridge" datadogKey = "_datadog" startTimeKey = "x-datadog-start-time" resourceNameKey = "x-datadog-resource-name" maxSizeBytes = 256 * 1024 // 256 KB ) +func init() { + telemetry.LoadIntegration(componentName) + tracer.MarkIntegrationImported("github.com/aws/aws-sdk-go-v2") +} + type messageCarrier map[string]string func (carrier messageCarrier) Set(key, val string) { diff --git a/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge_test.go b/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge_test.go index 0e5d6c8df8..c4ba41f00b 100644 --- a/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge_test.go +++ b/contrib/aws/aws-sdk-go-v2/aws/eventbridge/eventbridge_test.go @@ -1,3 +1,8 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016 Datadog, Inc. + package eventbridge import ( diff --git a/contrib/aws/aws-sdk-go-v2/aws/sns/sns.go b/contrib/aws/aws-sdk-go-v2/aws/sns/sns.go index 26d0a1c9ff..39fd81f871 100644 --- a/contrib/aws/aws-sdk-go-v2/aws/sns/sns.go +++ b/contrib/aws/aws-sdk-go-v2/aws/sns/sns.go @@ -1,3 +1,8 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016 Datadog, Inc. + package sns import ( @@ -9,13 +14,20 @@ import ( "github.com/aws/smithy-go/middleware" "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" "gopkg.in/DataDog/dd-trace-go.v1/internal/log" + "gopkg.in/DataDog/dd-trace-go.v1/internal/telemetry" ) const ( + componentName = "aws/aws-sdk-go-v2/aws/sns" datadogKey = "_datadog" maxMessageAttributes = 10 ) +func init() { + telemetry.LoadIntegration(componentName) + tracer.MarkIntegrationImported("github.com/aws/aws-sdk-go-v2") +} + type messageCarrier map[string]string func (carrier messageCarrier) Set(key, val string) { diff --git a/contrib/aws/aws-sdk-go-v2/aws/sns/sns_test.go b/contrib/aws/aws-sdk-go-v2/aws/sns/sns_test.go index 9c04097d0b..a74353225a 100644 --- a/contrib/aws/aws-sdk-go-v2/aws/sns/sns_test.go +++ b/contrib/aws/aws-sdk-go-v2/aws/sns/sns_test.go @@ -1,3 +1,8 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016 Datadog, Inc. + package sns import ( diff --git a/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs.go b/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs.go index c474c9abea..e095af9c02 100644 --- a/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs.go +++ b/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs.go @@ -1,3 +1,8 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016 Datadog, Inc. + package sqs import ( @@ -9,13 +14,20 @@ import ( "github.com/aws/smithy-go/middleware" "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" "gopkg.in/DataDog/dd-trace-go.v1/internal/log" + "gopkg.in/DataDog/dd-trace-go.v1/internal/telemetry" ) const ( + componentName = "aws/aws-sdk-go-v2/aws/sqs" datadogKey = "_datadog" maxMessageAttributes = 10 ) +func init() { + telemetry.LoadIntegration(componentName) + tracer.MarkIntegrationImported("github.com/aws/aws-sdk-go-v2") +} + type messageCarrier map[string]string func (carrier messageCarrier) Set(key, val string) { diff --git a/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs_test.go b/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs_test.go index 559a904f21..e7030743b0 100644 --- a/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs_test.go +++ b/contrib/aws/aws-sdk-go-v2/aws/sqs/sqs_test.go @@ -1,3 +1,8 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016 Datadog, Inc. + package sqs import (