Currently the plugin, if the service provider is configured with telemetry in the terraform-provider-openapi.yaml plugin config file, will submit total executions any time the plugin is invoked by Terraform. This is good, but additionally I would like more insight in terms of the plugin's usage.
As an OpenAPI Terraform provider
I want the plugin to submit metrics related to resource and operation execution usage
So that I have more level of insight of resource adoption and usage which then helps me understand the impact each resource is having.
Describe the solution you'd like
I would like the telemetry handler to submit a metric any time a resource is being provisioned. The metric should include the following information:
This should be supported for both the Graphite and HttpEndpoint telemetry providers.
Acceptance criteria
What's required to consider this feature request complete?
HTTP endpoint example:
Scenario: Plugin submits resource information and operation performed as part of telemetry data to HTTP endpoint configured
Given a new version of the OpenAPI Terraform plugin and a terraform config file (see example below)
When the plugin is executed to create, update, read, delete a resource (eg: terraform plan/apply/destroy/refresh)
Then the plugin should submit as part of the telemetry data the service provider name, the resource executed and the operation performed.
Example plugin config file with http_endpoing telemetry enabled for the service provider
Scenario: Plugin submits resource information and operation performed as part of telemetry data to Graphite endpoint configured
Given a new version of the OpenAPI Terraform plugin and a terraform config file (see example below)
When the plugin is executed to create, update, read, delete a resource (eg: terraform plan/apply/destroy/refresh)
Then the plugin should submit as part of the telemetry data the service provider name, the resource executed and the operation performed.
Example plugin config file with graphite telemetry enabled for the service provider
A clear and concise description of any alternative solutions or features you've considered.
Additional context
At the moment the plugin submits when the provider ConfigureFunc is assigned. This issue requires the telemetry handler to be configured in the resourceFactory so then the handler can be called inside each of the CRUD operations.
Checklist (for admin only)
Don't forget to go through the checklist to make sure the issue is created properly:
[x] I have added a corresponding label (feature request) to the issue (right side menu)
[x] I have added this issue to the 'API Terraform Provider' GitHub project (right side menu)
Is your feature request related to a problem?
Currently the plugin, if the service provider is configured with telemetry in the terraform-provider-openapi.yaml plugin config file, will submit total executions any time the plugin is invoked by Terraform. This is good, but additionally I would like more insight in terms of the plugin's usage.
Describe the solution you'd like
I would like the telemetry handler to submit a metric any time a resource is being provisioned. The metric should include the following information:
Proposed metric name and tags below:
tags := []string{"provider_name:" + providerName, "resource_name:" + resourceName, fmt.Sprintf("terraform_operation:%s", tfOperation)} metricName := "terraform.provider"
This should be supported for both the Graphite and HttpEndpoint telemetry providers.
Acceptance criteria
What's required to consider this feature request complete?
HTTP endpoint example:
Graphite example:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
At the moment the plugin submits when the provider ConfigureFunc is assigned. This issue requires the telemetry handler to be configured in the resourceFactory so then the handler can be called inside each of the CRUD operations.
Checklist (for admin only)
Don't forget to go through the checklist to make sure the issue is created properly: