-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
flare.go
19 lines (16 loc) · 946 Bytes
/
flare.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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-present Datadog, Inc.
package flare
import (
"github.com/DataDog/datadog-agent/comp/core/flare/helpers"
"github.com/DataDog/datadog-agent/pkg/config"
pkgconfigmodel "github.com/DataDog/datadog-agent/pkg/config/model"
"github.com/DataDog/datadog-agent/pkg/config/utils"
)
// SendFlare sends a flare and returns the message returned by the backend. This entry point is deprecated in favor of
// the 'Send' method of the flare component.
func SendFlare(cfg pkgconfigmodel.Reader, archivePath string, caseID string, email string, source helpers.FlareSource) (string, error) {
return helpers.SendTo(cfg, archivePath, caseID, email, config.Datadog.GetString("api_key"), utils.GetInfraEndpoint(config.Datadog), source)
}