Skip to content

Commit

Permalink
[opencensus/datadog] Add NewExporterWithOptions (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
marnie-eure committed Feb 15, 2022
1 parent d530968 commit 3d7a12c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions platform/opencensus/datadog/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ type Exporter struct {

// NewExporter returns initialized *Exporter.
func NewExporter(name string) (*Exporter, error) {
exp, err := datadog.NewExporter(
datadog.Options{
Service: name,
},
)
return NewExporterWithOptions(datadog.Options{
Service: name,
})
}

// NewExporterWithOptions returns initialized *Exporter.
func NewExporterWithOptions(opts datadog.Options) (*Exporter, error) {
exp, err := datadog.NewExporter(opts)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 3d7a12c

Please sign in to comment.