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

SpansMetric always wants to be updated #711

Open
op opened this issue Dec 3, 2024 · 1 comment
Open

SpansMetric always wants to be updated #711

op opened this issue Dec 3, 2024 · 1 comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). blocked The issue cannot be resolved without 3rd party action. kind/bug Some behavior is incorrect or out of spec

Comments

@op
Copy link

op commented Dec 3, 2024

Describe what happened

We have a SpansMetric defined in Pulumi but it always seem to contain an empty diff. We have tried pulumi up and pulumi refresh, still the same.

Sample program

datadog.SpansMetric(
    "my_backup_success",
    name="my_backup.backup_success",
    compute=datadog.SpansMetricComputeArgs(
        path="@backup_success",
        aggregation_type="distribution",
    ),
    filter=datadog.SpansMetricFilterArgs(
        query="service:my-backup resource_name:my-backup.backup",
    ),
    group_bies=[
        datadog.SpansMetricGroupByArgs(path="env", tag_name="env"),
    ],
)

Log output

https://gist.github.com/op/07a8863312b8edb36994b7d83fd548a7

Affected Resource(s)

No response

Output of pulumi about

pulumi about
CLI
Version      3.141.0
Go Version   go1.23.3
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.27.0
resource  cloudflare  5.34.0
resource  datadog     4.27.0
resource  gcp         6.67.1
resource  kafka       3.7.1
resource  oci         1.27.0
resource  postgresql  3.11.0
language  python      unknown
resource  random      4.16.0

Host
OS       ubuntu
Version  24.04
Arch     x86_64

This project is written in python: executable='/home/.../ops/pulumi/venv/bin/python' version='3.11.9'

[..]

Backend
Name           pulumi.com
[..]

Dependencies:
NAME               VERSION
boto3              1.35.69
cryptography       42.0.8
pip                24.0
pulumi_aws         6.27.0
pulumi_cloudflare  5.34.0
pulumi_datadog     4.27.0
pulumi-gcp         6.67.1
pulumi_kafka       3.7.1
pulumi_oci         1.27.0
pulumi_postgresql  3.11.0
pulumi_random      4.16.0
setuptools         65.5.0
shared             0.0.1

Additional context

I tried to re-create it by running and using the output from this:

pulumi state delete urn:pulumi:main::my::datadog:index/spansMetric:SpansMetric::my_backup_success
pulumi import datadog:index/spansMetric:SpansMetric my_backup_success my_backup.backup_success

Running pulumi up or pulumi refresh still show a diff.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@op op added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 3, 2024
@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented Dec 5, 2024

Hey thanks for reporting and including a repro here @op. This seems to be a problem with the terraform provider which we use under the hood. I've raised an issue and a PR there:
DataDog/terraform-provider-datadog#2706
DataDog/terraform-provider-datadog#2707

This is further made worse by the fact we do not display the property which causes the problem. I had a look at the logs and that is include_percentiles. While waiting for this to be fixed, you should be able to work around the problem by setting that explicitly to false, like so:

datadog.SpansMetric(
    "my_backup_success",
    name="my_backup.backup_success",
    compute=datadog.SpansMetricComputeArgs(
        path="@backup_success",
        aggregation_type="distribution",
        include_percentiles=False,
    ),
    filter=datadog.SpansMetricFilterArgs(
        query="service:my-backup resource_name:my-backup.backup",
    ),
    group_bies=[
        datadog.SpansMetricGroupByArgs(path="env", tag_name="env"),
    ],

@VenelinMartinov VenelinMartinov added blocked The issue cannot be resolved without 3rd party action. awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). blocked The issue cannot be resolved without 3rd party action. kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants