Skip to content

Commit

Permalink
Add IncServiceProviderResourceTotalRunsCounter to the telemetry provi…
Browse files Browse the repository at this point in the history
…der stub

- Saves the provider name, resource, and operation received
  • Loading branch information
lillchan committed Apr 23, 2020
1 parent 70d3c83 commit f8edfc3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openapi/plugin_config_telemetry_provider_stub.go
Expand Up @@ -7,6 +7,8 @@ type telemetryProviderStub struct {
terraformVersionReceived string
openAPIPluginVersionReceived string
providerNameReceived string
resourceNameReceived string
tfOperationReceived TelemetryResourceOperation
telemetryProviderConfig TelemetryProviderConfiguration
}

Expand All @@ -29,6 +31,13 @@ func (t *telemetryProviderStub) IncServiceProviderTotalRunsCounter(providerName
return nil
}

func (t *telemetryProviderStub) IncServiceProviderResourceTotalRunsCounter(providerName, resourceName string, tfOperation TelemetryResourceOperation, telemetryProviderConfiguration TelemetryProviderConfiguration) error {
t.providerNameReceived = providerName
t.resourceNameReceived = resourceName
t.tfOperationReceived = tfOperation
return nil
}

func (t *telemetryProviderStub) GetTelemetryProviderConfiguration(data *schema.ResourceData) TelemetryProviderConfiguration {
return t.telemetryProviderConfig
}

0 comments on commit f8edfc3

Please sign in to comment.