Skip to content

Commit

Permalink
fix: use DD_SITE env var instead of hardcoded value (#2888)
Browse files Browse the repository at this point in the history
## Describe your changes

Using the DD_SITE env var in telemetry.ts instead of hardcoded value. 

## Issue ticket number and link
https://linear.app/nango/issue/NAN-1957/solve-datadog-issues

## Checklist before requesting a review (skip if just adding/editing
APIs & templates)
- [ ] I added tests, otherwise the reason is: 
- [ ] I added observability, otherwise the reason is:
- [ ] I added analytics, otherwise the reason is:
  • Loading branch information
TBonnin authored Oct 25, 2024
1 parent 08e73a2 commit 8d38e16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shared/lib/utils/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class Telemetry {
private logInstance: v2.LogsApi | undefined;
constructor() {
try {
if ((isCloud || isEnterprise) && process.env['DD_API_KEY'] && process.env['DD_APP_KEY']) {
if ((isCloud || isEnterprise) && process.env['DD_API_KEY'] && process.env['DD_APP_KEY'] && process.env['DD_SITE']) {
const configuration = client.createConfiguration();
configuration.setServerVariables({
site: 'us3.datadoghq.com'
site: process.env['DD_SITE']
});
this.logInstance = new v2.LogsApi(configuration);
}
Expand Down

0 comments on commit 8d38e16

Please sign in to comment.