diff --git a/pkg/logs/client/http/destination.go b/pkg/logs/client/http/destination.go index 2a189da..e85b822 100644 --- a/pkg/logs/client/http/destination.go +++ b/pkg/logs/client/http/destination.go @@ -133,6 +133,7 @@ func (d *Destination) unconditionalSend(payload []byte) (err error) { // this can happen when the method or the url are valid. return err } + req.Header.Set("User-Agent", "categraf") req.Header.Set("CATEGRAF-API-KEY", d.apiKey) req.Header.Set("Content-Type", d.contentType) req.Header.Set("Content-Encoding", d.contentEncoding.name()) diff --git a/pkg/logs/input/channel/tailer.go b/pkg/logs/input/channel/tailer.go index bae9535..797aaa8 100644 --- a/pkg/logs/input/channel/tailer.go +++ b/pkg/logs/input/channel/tailer.go @@ -15,7 +15,7 @@ import ( ) // serviceEnvVar is the environment variable of the service tag (this is used only for the serverless agent) -const serviceEnvVar = "DD_SERVICE" +const serviceEnvVar = "FC_SERVICE" // Tailer consumes and processes a channel of strings, and sends them to a stream of log messages. type Tailer struct { diff --git a/pkg/logs/message/origin.go b/pkg/logs/message/origin.go index 2787761..37a5b2e 100644 --- a/pkg/logs/message/origin.go +++ b/pkg/logs/message/origin.go @@ -39,11 +39,11 @@ func (o *Origin) TagsPayload() []byte { source := o.Source() if source != "" { - tagsPayload = append(tagsPayload, []byte("[dd ddsource=\""+source+"\"]")...) + tagsPayload = append(tagsPayload, []byte("[fc fcsource=\""+source+"\"]")...) } sourceCategory := o.LogSource.Config.SourceCategory if sourceCategory != "" { - tagsPayload = append(tagsPayload, []byte("[dd ddsourcecategory=\""+sourceCategory+"\"]")...) + tagsPayload = append(tagsPayload, []byte("[fc fcsourcecategory=\""+sourceCategory+"\"]")...) } var tags []string @@ -51,7 +51,7 @@ func (o *Origin) TagsPayload() []byte { tags = append(tags, o.tags...) if len(tags) > 0 { - tagsPayload = append(tagsPayload, []byte("[dd ddtags=\""+strings.Join(tags, ",")+"\"]")...) + tagsPayload = append(tagsPayload, []byte("[fc fctags=\""+strings.Join(tags, ",")+"\"]")...) } if len(tagsPayload) == 0 { tagsPayload = []byte{}