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

[APM/Dashboards] add apm_stats_query #676

Merged
merged 9 commits into from
Oct 1, 2020
Merged

Conversation

anbnyc
Copy link
Contributor

@anbnyc anbnyc commented Sep 29, 2020

We are supporting a new query type in dashboards for APM data sources. This PR would allow users to import and create dashboards with this query using Terraform.

See https://github.com/DataDog/datadog-api-spec/pull/579 for API spec.

@anbnyc anbnyc requested a review from a team as a code owner September 29, 2020 14:46
@anbnyc anbnyc mentioned this pull request Sep 29, 2020
@anbnyc anbnyc force-pushed the alec.barrett/apm_stats_query branch from 55c3028 to 01cc1d4 Compare September 29, 2020 18:59
if v, ok := terraformQuery["primary_tag"].(string); ok && len(v) != 0 {
datadogQuery.SetPrimaryTag(v)
}
if v, ok := terraformQuery["row_type"].(datadogV1.ApmStatsQueryRowType); ok && len(v) != 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting an error for terraformQuery["row_type"].(string) and I think this is the solution, but please let me know if there's a more correct way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might more make sense to do datadogQuery.SetRowType(datadogV1.ApmStatsQueryRowType(v)).

@therve
Copy link
Contributor

therve commented Sep 30, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@therve therve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small comment, please add a test, and change the documentation. Thanks!

if v, ok := terraformQuery["primary_tag"].(string); ok && len(v) != 0 {
datadogQuery.SetPrimaryTag(v)
}
if v, ok := terraformQuery["row_type"].(datadogV1.ApmStatsQueryRowType); ok && len(v) != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might more make sense to do datadogQuery.SetRowType(datadogV1.ApmStatsQueryRowType(v)).

@anbnyc anbnyc requested a review from therve September 30, 2020 16:31
@anbnyc anbnyc force-pushed the alec.barrett/apm_stats_query branch from 388aeb8 to 18ba8f3 Compare September 30, 2020 21:31
@therve
Copy link
Contributor

therve commented Oct 1, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@therve therve merged commit 95f2991 into master Oct 1, 2020
@therve therve deleted the alec.barrett/apm_stats_query branch October 1, 2020 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants