Skip to content

Allow multiple clients to different site (don't rely on global state) #1281

@haggholm

Description

@haggholm

We have a SaaS platform where we are interested in collecting metrics for more than one Datadog account; for example, we may want to collect our own metrics for internal use, but also send some metrics about jobs to our customers' Datadog accounts.

The problem is that this package implements server configuration as a singleton, in global state. If our internal config and the customer config have different values for the {site} server variable, then setting the value for one will override it in the global state maintained by the API's servers, here.

It would be much more convenient if this state were encapsulated in the client object rather than maintained globally (maybe with global state as the default and for backwards compatibility?). From a crass commercial perspective, it would also help us send Datadog more billable metrics… ;-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions