Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of custom junit intake URL #438

Open
emilgelman opened this issue Nov 21, 2021 · 6 comments
Open

Allow configuration of custom junit intake URL #438

emilgelman opened this issue Nov 21, 2021 · 6 comments
Labels
source-code-integration Related to [git-metadata]

Comments

@emilgelman
Copy link

We have a proxy service that we use to upload Junit tests to Datadog, so we need a way to set a custom value for the junit intake URL - for example DATADOG_JUNIT_INTAKE_URL, similarly to DATADOG_SOURCEMAP_INTAKE_URL

@emilgelman
Copy link
Author

#439

@lraucy
Copy link
Contributor

lraucy commented Dec 1, 2021

Hello @emilgelman! Quick question to make sure we understand your use-case properly:

The CLI already supports the env var HTTPS_PROXY to configure a proxy (like HTTPS_PROXY=http://my-proxy-address:3128).

Would this configuration work for your use case, rather than introducing a new env var DATADOG_JUNIT_INTAKE_URL? If not, could you elaborate?

The DATADOG_SOURCEMAP_INTAKE_URL env var was mostly designed for internal testing, not for proxy usage.

@emilgelman
Copy link
Author

emilgelman commented Dec 27, 2021

hi @lraucy , apologies for the late response. I've tried using HTTPS_PROXY for this, yet I'm getting
[attempt 1] Retrying jUnitXML upload [report.xml]: Socket is closed

I'm getting the same error trying to use datadog-ci sourcemaps upload, yet it works when I override with DATADOG_SOURCEMAP_INTAKE_URL. Anything else I can try?

@lraucy
Copy link
Contributor

lraucy commented Jan 25, 2022

Hi @emilgelman , sorry for the late response as well: what kind of proxy are you using? I have trouble to understand how datadog-ci sourcemaps upload could upload files to Datadog if you override DATADOG_SOURCEMAP_INTAKE_URL with your proxy URL: how does the proxy knows to which URL it should send sourcemaps to?

@emilgelman
Copy link
Author

Hey @lraucy
I'll try to provide additional context. To enforce certain standards and perform custom audits, any request towards Datadog's API is being proxied by an internal service we have (we are using Spring Cloud Gateway).

For example, if we need to use the Monitors API, instead of calling GET api.datadoghq.com/api/v1/monitor, our users would call GET api.mycompany.com/v1/monitors, where certain business logic is executed and then the request is routed to Datadog's API as is, based on the endpoint.

Same goes for the datadog-ci utility, but here there is additional logic that knows to redirect calls to /v1/input and /api/v2/srcmap to https://sourcemap-intake.datadoghq.eu/api/v2/srcmap, since the target host is different from the "general" API.

For example, this is how we would execute datadog-ci:

export DATADOG_SOURCEMAP_INTAKE_URL="api.mycompany.com";
export DATADOG_API_KEY="<key...>";
datadog-ci sourcemaps upload "static/" --service=...

I hope I made it more clear now.

@lefebvree lefebvree added the source-code-integration Related to [git-metadata] label Jan 27, 2023
@ransoor2
Copy link

Hi DD
We are interested in this feature as well.
Is there any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source-code-integration Related to [git-metadata]
Projects
None yet
Development

No branches or pull requests

4 participants