Need a resource to create custom metrics through Stackdriver Monitoring API.
API Documentation for custom metrics is available here.
google_monitoring_metric_descriptorresource "google_monitoring_metric_descriptor" {
project_id="project_test_123"
description="Daily sales records from all branch stores."
display_name="daily sales"
type="custom.googleapis.com/stores/daily_sales"
metric_kind="GAUGE"
value_type="DOUBLE"
unit="{USD}"
labels=[
{
key="store_id",
value_type="STRING",
description="The ID of the store."
}
]
}
Hey @ocervell! We weren't able to get this working up to our standards with Terraform due to issues with the underlying API, so we're not currently interested in adding this resource. That said, we'll leave this open to track interest in the feature.
@rileykarson Could you expand a little on what issues in particular the underlying API has ? Is it the lack of an update method ?
@ocervell IIRC there were a few issues with the underlying API that our code generator didn't handle well yet, such as lack of Operation objects for an async request and non standard HTTP codes. Additionally I got guidance from the API team that API descriptors should be automatically created for most scenarios and that custom metric descriptors should be exceptional. So at the time I chose to focus on getting alert policy and the other monitoring resources out over this one.
One year later I'd like to raise discussion again:
Started working on this
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
One year later I'd like to raise discussion again: