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

include the userid in the dashboard footer #38

Closed
martinm-nm opened this issue Sep 17, 2021 · 1 comment · Fixed by #54
Closed

include the userid in the dashboard footer #38

martinm-nm opened this issue Sep 17, 2021 · 1 comment · Fixed by #54
Labels
enhancement New feature or request

Comments

@martinm-nm
Copy link
Contributor

Context

At the moment libddog appends a footer in the dashboard description which includes the timestamp and the git branch name (if detected) of the last update to the dashboard. This already helps to narrow down how that last update happened, but it would be even more useful to also include the userid of the user who made the update (or whose credentials were used to make the update).

It looks like the user identity can be inferred from the app key via the Datadog API:

  1. Make a request to https://api.datadoghq.com/api/v2/current_user/application_keys to list all the app keys for the current user. Iterate over the list and pick the key that matches the app key that's being used in the session.
  2. Make a request to https://api.datadoghq.com/api/v2/current_user/application_keys/<app-key-id> to get details about that app key. In the response there is a handle attribute which contains the userid.
@martinm-nm martinm-nm added the enhancement New feature or request label Sep 17, 2021
@martinm-nm martinm-nm changed the title Include the userid in the dashboard footer include the userid in the dashboard footer Sep 17, 2021
@martinm-nm
Copy link
Contributor Author

Going by the API docs it looks like this would require migrating to the datadog-api-client package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant