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

Add internal label for tracking active series #30

Merged
merged 5 commits into from
Mar 30, 2022

Conversation

carrieedwards
Copy link
Contributor

This PR adds an internal label to all metrics parsed by the proxy before being written to cortex. This internal label will be used for tracking the number of active series.

lbls = append(lbls, cortexpb.LabelAdapter{
Name: labels.MetricName,
Value: name,
})
lbls = append(lbls, cortexpb.LabelAdapter{
Name: "_original_format",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Name: "_original_format",
Name: "__original_source__",

I'd rename this label to __original_source__ for a few reasons:

  • An internal label in Prometheus is actually prefixed by two underscores. The suffix just makes it more regular with the others like __name__.
  • Although we're thinking of this label as "internal" its not actually internal because its not recognized by prometheus or cortex themselves. That said we could actually upstream this change to cortex, since there will be other proxies translating from other sources. So we can make this an internal label recognized by cortex and then the translators can just import the label. No need to do this now but could be a great idea when there are other translators available.
  • I prefer source over format because to me its more natural to refer to influx as a source database rather than a metric format.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And since this is going to be an important tag, we should define the string as a constant somewhere rather than as an inline literal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was part of the offline discussion before the initial comment was made, but thinking about it more, I think __proxy_source__ would be better. original doesn't add much information to the label name, but source by itself seems too generic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think proxy_source is good. I will update it.

@grafanabot
Copy link

Go coverage report:

Source Func %
github.com/grafana/influx2cortex/pkg/errorx/errors.go:32: FromGRPCStatus 84.2%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:71: WithErrorxTypeDetail 75.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:86: ErrorAsGRPCStatus 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:109: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:116: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:120: Unwrap 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:124: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:128: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:132: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:145: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:152: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:156: Unwrap 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:160: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:164: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:168: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:184: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:191: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:195: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:199: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:203: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:207: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:221: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:228: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:232: Unwrap 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:236: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:240: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:244: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:254: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:258: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:262: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:266: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:270: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:282: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:286: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:290: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:294: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:298: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:310: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:314: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:318: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:322: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:326: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:339: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:346: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:350: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:354: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:358: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:362: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:375: Error 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:382: Message 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:386: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:390: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:394: GRPCStatus 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:398: GRPCStatusDetails 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:411: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:418: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:422: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:426: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:430: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:434: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/http_translator.go:20: LogAndSetHTTPError 100.0%
github.com/grafana/influx2cortex/pkg/errorx/http_translator.go:44: tryUnwrap 100.0%
github.com/grafana/influx2cortex/pkg/influx/api.go:30: Register 0.0%
github.com/grafana/influx2cortex/pkg/influx/api.go:34: NewAPI 100.0%
github.com/grafana/influx2cortex/pkg/influx/api.go:43: handleSeriesPush 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:17: tryUnwrap 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:29: handleError 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:71: isNetworkTimeout 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:80: isGRPCTimeout 100.0%
github.com/grafana/influx2cortex/pkg/influx/parser.go:24: parseInfluxLineReader 88.2%
github.com/grafana/influx2cortex/pkg/influx/parser.go:53: writeRequestFromInfluxPoints 85.7%
github.com/grafana/influx2cortex/pkg/influx/parser.go:73: influxPointToTimeseries 77.4%
github.com/grafana/influx2cortex/pkg/influx/parser.go:141: replaceInvalidChars 83.3%
github.com/grafana/influx2cortex/pkg/influx/parser.go:160: batchReadCloser 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:22: NewRecorder 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:62: measureMetricsParsed 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:67: measureMetricsWritten 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:72: measureProxyErrors 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:77: measureConversionDuration 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:45: RoundTrip 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:66: RegisterFlags 0.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:74: RegisterFlagsWithPrefix 0.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:88: NewClient 92.3%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:132: Write 73.9%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:178: do 88.9%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:196: errFromResp 75.0%
github.com/grafana/influx2cortex/pkg/remotewrite/measured_client.go:18: NewMeasuredClient 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/measured_client.go:27: Write 87.5%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go:17: NewRecorder 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go:44: measureOutOfOrderSamples 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go:48: measure 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:21: WithDefaultResolver 0.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:32: TenantID 0.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:42: TenantIDs 0.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:62: NewSingleResolver 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:72: containsUnsafePathSegments 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:83: TenantID 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:97: TenantIDs 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:112: NewMultiResolver 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:116: TenantID 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:129: TenantIDs 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:151: ExtractTenantIDFromHTTPRequest 0.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:27: Error 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:38: NormalizeTenantIDs 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:58: ValidTenantID 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:76: JoinTenantIDs 0.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:83: isSupported 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:109: TenantIDsFromOrgID 0.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:18: GetSourceIPsFromOutgoingCtx 100.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:31: GetSourceIPsFromIncomingCtx 100.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:44: AddSourceIPsToOutgoingContext 0.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:52: AddSourceIPsToIncomingContext 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:32: IsRequestBodyTooLarge 100.0%
github.com/grafana/influx2cortex/pkg/util/http.go:42: RegisterFlagsWithPrefix 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:48: IsEnabled 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:53: WriteJSONResponse 66.7%
github.com/grafana/influx2cortex/pkg/util/http.go:69: WriteYAMLResponse 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:87: WriteTextResponse 100.0%
github.com/grafana/influx2cortex/pkg/util/http.go:95: WriteHTMLResponse 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:104: RenderHTTPResponse 85.7%
github.com/grafana/influx2cortex/pkg/util/http.go:118: StreamWriteYAMLResponse 60.0%
github.com/grafana/influx2cortex/pkg/util/http.go:145: ParseProtoReader 80.0%
github.com/grafana/influx2cortex/pkg/util/http.go:174: decompressRequest 81.8%
github.com/grafana/influx2cortex/pkg/util/http.go:192: decompressFromReader 83.3%
github.com/grafana/influx2cortex/pkg/util/http.go:218: decompressFromBuffer 75.0%
github.com/grafana/influx2cortex/pkg/util/http.go:248: tryBufferFromReader 100.0%
github.com/grafana/influx2cortex/pkg/util/http.go:258: SerializeProtoResponse 60.0%
github.com/grafana/influx2cortex/pkg/util/log/experimental.go:23: WarnExperimentalUse 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go:27: InitLogger 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go:40: NewDefaultLogger 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go:53: CheckFatal 0.0%
github.com/grafana/influx2cortex/pkg/util/log/rate_limit.go:20: NewRateLimitedLogger 100.0%
github.com/grafana/influx2cortex/pkg/util/log/rate_limit.go:32: Log 85.7%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:19: WithUserID 0.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:26: WithTraceID 0.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:37: WithContext 0.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:55: WithSourceIPs 0.0%
github.com/grafana/influx2cortex/pkg/util/push/push.go:37: Handler 58.8%
total: (statements) 73.1%

jesusvazquez
jesusvazquez previously approved these changes Mar 28, 2022
Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grafanabot
Copy link

Go coverage report:

Source Func %
github.com/grafana/influx2cortex/pkg/errorx/errors.go:32: FromGRPCStatus 84.2%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:71: WithErrorxTypeDetail 75.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:86: ErrorAsGRPCStatus 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:109: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:116: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:120: Unwrap 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:124: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:128: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:132: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:145: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:152: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:156: Unwrap 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:160: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:164: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:168: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:184: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:191: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:195: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:199: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:203: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:207: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:221: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:228: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:232: Unwrap 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:236: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:240: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:244: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:254: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:258: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:262: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:266: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:270: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:282: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:286: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:290: HTTPStatusCode 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:294: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:298: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:310: Error 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:314: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:318: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:322: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:326: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:339: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:346: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:350: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:354: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:358: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:362: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:375: Error 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:382: Message 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:386: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:390: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:394: GRPCStatus 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:398: GRPCStatusDetails 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:411: Error 66.7%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:418: Message 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:422: Unwrap 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:426: HTTPStatusCode 0.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:430: GRPCStatus 100.0%
github.com/grafana/influx2cortex/pkg/errorx/errors.go:434: GRPCStatusDetails 100.0%
github.com/grafana/influx2cortex/pkg/errorx/http_translator.go:20: LogAndSetHTTPError 100.0%
github.com/grafana/influx2cortex/pkg/errorx/http_translator.go:44: tryUnwrap 100.0%
github.com/grafana/influx2cortex/pkg/influx/api.go:30: Register 0.0%
github.com/grafana/influx2cortex/pkg/influx/api.go:34: NewAPI 100.0%
github.com/grafana/influx2cortex/pkg/influx/api.go:43: handleSeriesPush 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:17: tryUnwrap 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:29: handleError 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:71: isNetworkTimeout 100.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go:80: isGRPCTimeout 100.0%
github.com/grafana/influx2cortex/pkg/influx/parser.go:24: parseInfluxLineReader 88.2%
github.com/grafana/influx2cortex/pkg/influx/parser.go:53: writeRequestFromInfluxPoints 85.7%
github.com/grafana/influx2cortex/pkg/influx/parser.go:73: influxPointToTimeseries 77.4%
github.com/grafana/influx2cortex/pkg/influx/parser.go:141: replaceInvalidChars 83.3%
github.com/grafana/influx2cortex/pkg/influx/parser.go:160: batchReadCloser 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:22: NewRecorder 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:62: measureMetricsParsed 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:67: measureMetricsWritten 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:72: measureProxyErrors 100.0%
github.com/grafana/influx2cortex/pkg/influx/recorder.go:77: measureConversionDuration 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:45: RoundTrip 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:66: RegisterFlags 0.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:74: RegisterFlagsWithPrefix 0.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:88: NewClient 92.3%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:132: Write 73.9%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:178: do 88.9%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go:196: errFromResp 75.0%
github.com/grafana/influx2cortex/pkg/remotewrite/measured_client.go:18: NewMeasuredClient 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/measured_client.go:27: Write 87.5%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go:17: NewRecorder 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go:44: measureOutOfOrderSamples 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go:48: measure 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:21: WithDefaultResolver 0.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:32: TenantID 0.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:42: TenantIDs 0.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:62: NewSingleResolver 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:72: containsUnsafePathSegments 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:83: TenantID 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:97: TenantIDs 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:112: NewMultiResolver 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:116: TenantID 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:129: TenantIDs 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go:151: ExtractTenantIDFromHTTPRequest 0.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:27: Error 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:38: NormalizeTenantIDs 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:58: ValidTenantID 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:76: JoinTenantIDs 0.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:83: isSupported 100.0%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go:109: TenantIDsFromOrgID 0.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:18: GetSourceIPsFromOutgoingCtx 100.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:31: GetSourceIPsFromIncomingCtx 100.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:44: AddSourceIPsToOutgoingContext 0.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go:52: AddSourceIPsToIncomingContext 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:32: IsRequestBodyTooLarge 100.0%
github.com/grafana/influx2cortex/pkg/util/http.go:42: RegisterFlagsWithPrefix 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:48: IsEnabled 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:53: WriteJSONResponse 66.7%
github.com/grafana/influx2cortex/pkg/util/http.go:69: WriteYAMLResponse 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:87: WriteTextResponse 100.0%
github.com/grafana/influx2cortex/pkg/util/http.go:95: WriteHTMLResponse 0.0%
github.com/grafana/influx2cortex/pkg/util/http.go:104: RenderHTTPResponse 85.7%
github.com/grafana/influx2cortex/pkg/util/http.go:118: StreamWriteYAMLResponse 60.0%
github.com/grafana/influx2cortex/pkg/util/http.go:145: ParseProtoReader 80.0%
github.com/grafana/influx2cortex/pkg/util/http.go:174: decompressRequest 81.8%
github.com/grafana/influx2cortex/pkg/util/http.go:192: decompressFromReader 83.3%
github.com/grafana/influx2cortex/pkg/util/http.go:218: decompressFromBuffer 75.0%
github.com/grafana/influx2cortex/pkg/util/http.go:248: tryBufferFromReader 100.0%
github.com/grafana/influx2cortex/pkg/util/http.go:258: SerializeProtoResponse 60.0%
github.com/grafana/influx2cortex/pkg/util/log/experimental.go:23: WarnExperimentalUse 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go:27: InitLogger 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go:40: NewDefaultLogger 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go:53: CheckFatal 0.0%
github.com/grafana/influx2cortex/pkg/util/log/rate_limit.go:20: NewRateLimitedLogger 100.0%
github.com/grafana/influx2cortex/pkg/util/log/rate_limit.go:32: Log 85.7%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:19: WithUserID 0.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:26: WithTraceID 0.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:37: WithContext 0.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go:55: WithSourceIPs 0.0%
github.com/grafana/influx2cortex/pkg/util/push/push.go:37: Handler 58.8%
total: (statements) 73.1%

Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__proxy_source__ ftw

@carrieedwards carrieedwards merged commit ef77bae into main Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants