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

fix: OpenTelemetry metric names must only contain [A-Za-z0-9_.-] #369

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hub/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
h.telemetryShutdownFunc = shutdownTelemetry

hydrateCalls, err := otel.GetMeterProvider().Meter(constants.FdwName).Int64Counter(
fmt.Sprintf("%s/hydrate_calls_total", constants.FdwName),
fmt.Sprintf("%s-hydrate_calls_total", constants.FdwName),
metric.WithDescription("The total number of hydrate calls"),
)
if err != nil {
Expand Down Expand Up @@ -269,7 +269,7 @@
// GetIterator creates and returns an iterator
func (h *Hub) GetIterator(columns []string, quals *proto.Quals, unhandledRestrictions int, limit int64, opts types.Options) (Iterator, error) {
logging.LogTime("GetIterator start")
qualMap, err := h.buildQualMap(quals)

Check failure on line 272 in hub/hub.go

View workflow job for this annotation

GitHub Actions / golangci-lint

ineffectual assignment to err (ineffassign)
connectionName := opts["connection"]
table := opts["table"]
log.Printf("[TRACE] Hub GetIterator() table '%s'", table)
Expand Down Expand Up @@ -397,9 +397,9 @@
// build path keys based on the table key columns
// NOTE: the schema data has changed in SDK version 1.3 - we must handle plugins using legacy sdk explicitly
// check for legacy sdk versions
if tableSchema.ListCallKeyColumns != nil {

Check failure on line 400 in hub/hub.go

View workflow job for this annotation

GitHub Actions / golangci-lint

SA1019: tableSchema.ListCallKeyColumns is deprecated: Marked as deprecated in plugin.proto. (staticcheck)
log.Printf("[TRACE] schema response include ListCallKeyColumns, it is using legacy protobuff interface ")
pathKeys = types.LegacyKeyColumnsToPathKeys(tableSchema.ListCallKeyColumns, tableSchema.ListCallOptionalKeyColumns, allColumns)

Check failure on line 402 in hub/hub.go

View workflow job for this annotation

GitHub Actions / golangci-lint

SA1019: tableSchema.ListCallKeyColumns is deprecated: Marked as deprecated in plugin.proto. (staticcheck)
} else if tableSchema.ListCallKeyColumnList != nil {
log.Printf("[TRACE] schema response include ListCallKeyColumnList, it is using the updated protobuff interface ")
// generate path keys if there are required list key columns
Expand Down Expand Up @@ -776,12 +776,12 @@
switch command {
case constants.LegacyCommandCacheClear:
// set the cache clear time for the remote query cache
h.cacheSettings.Apply(string(settings.SettingKeyCacheClearTimeOverride), "")

Check failure on line 779 in hub/hub.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `h.cacheSettings.Apply` is not checked (errcheck)

case constants.LegacyCommandCacheOn:
h.cacheSettings.Apply(string(settings.SettingKeyCacheEnabled), "true")

Check failure on line 782 in hub/hub.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `h.cacheSettings.Apply` is not checked (errcheck)
case constants.LegacyCommandCacheOff:
h.cacheSettings.Apply(string(settings.SettingKeyCacheClearTimeOverride), "false")

Check failure on line 784 in hub/hub.go

View workflow job for this annotation

GitHub Actions / golangci-lint

Error return value of `h.cacheSettings.Apply` is not checked (errcheck)
}
return nil
}
Expand Down
Loading