Skip to content

google_logging_metric linear_buckets width should allow float #4382

@algermissen

Description

@algermissen

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Terraform Version

0.11.14

Affected Resource(s)

  • google_logging_metric

Terraform Configuration Files

resource "google_logging_metric" "dns_relay_queries_latency" {
  provider = "google-beta"
  project  = "xxxx"
  name     = "dns-relay/queries/latency"
  filter   = "resource.type=\"gce_instance\" AND logName=\"projects/xxxx/logs/gcplogs-docker-driver\""

  metric_descriptor {
    metric_kind = "DELTA"
    value_type  = "DISTRIBUTION"
  }

  value_extractor = "REGEXP_EXTRACT(jsonPayload.message, \" ([0-9.]+)s$\")"

  bucket_options {
    linear_buckets {
      num_finite_buckets = "20"
      width              = "0.1"
      offset             = "0"
    }
  }
}

Debug Output

Panic Output

Expected Behavior

Floating point numbers should be supported. At least in the Stackdriver UI I can enter a float. It is also the only way to deal with values < 1 in the distribution usefully.

Actual Behavior

Error: google_logging_metric.dns_relay_queries_latency: bucket_options.0.linear_buckets.0.width: cannot parse '' as int: strconv.ParseInt: parsing "0.1": invalid syntax

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions