Closed theogravity closed 2 years ago
Hi,
https://github.com/DataDog/datadog-api-client-typescript#changing-server should have the response. Thanks.
@therve
I have a user reporting that the site specification isn't working in:
https://github.com/theogravity/pino-datadog-transport/issues/5
My integration code looks like this:
import build from 'pino-abstract-transport'
import { client, v2 } from '@datadog/datadog-api-client'
import { DDTransportOptions, processLogBuilder } from './process-logs'
module.exports = function (options: DDTransportOptions) {
const configuration = client.createConfiguration(options.ddClientConf)
client.setServerVariables(configuration, options?.ddServerConf || {})
const apiInstance = new v2.LogsApi(configuration)
return build(processLogBuilder(options, apiInstance))
}
Do I need to do anything specifically with the client
, or is the config global?
The user is passing the ddServerConf
var via:
ddServerConf: { site: 'datadoghq.eu' }
I eventually send the logs via:
const params: LogsApiSubmitLogRequest = {
body: logsToSend,
contentEncoding: 'gzip',
}
const result = await apiInstance.submitLog(params)
That looks correct. Your user should check if the 403 comes from the EU server.
User now reports it's working fine, must have been some transient issue. Thanks.
https://datadoghq.dev/datadog-api-client-typescript/classes/v2.LogsApi.html
Where would you specify the eu server for log ingestion?