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

Mackjmr/merge main to prod staging #4951

Merged
merged 68 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
812d799
[receiver/collectd] Move to use HTTPServerSettings with collectdrecei…
atoulme Oct 31, 2023
39ace36
[chore][exporter/datadog] Re-enable TestTraceExporter (#28827)
songy23 Oct 31, 2023
faada96
[chore][receiver/hostmetrics] Skip process user error (un)muted test …
pjanotti Oct 31, 2023
1c63ac9
[receiver/hostmetricsreceiver] Add support for cpu frequency metric (…
ChrsMark Oct 31, 2023
7efdf16
[encoding/zipkinencodingextension] add default case (#28689)
VihasMakwana Nov 1, 2023
7e06d30
[chore] Upgrade cloud.google.com/go (#28840)
dmitryax Nov 1, 2023
fe06dee
[connector/exceptions] Add trace id and span id to generated logs (#2…
marctc Nov 1, 2023
7647d4c
[chore][exporter/loadbalancing] use headless service with DNS mode in…
Liubey Nov 1, 2023
64a787d
Update README.md (#28844)
datsabk Nov 1, 2023
5c69f33
exporter/datadog: disable APM stats via feature flag (#28616)
gbbr Nov 1, 2023
9edd6a9
[receiver/zipkin] follow receiver contract (#28627)
VihasMakwana Nov 1, 2023
f530bc4
[chore][exporter/sumologicexporter] use errors.Join instead of go.ube…
bagmeg Nov 1, 2023
1b8ccde
[receiver/wavefront] wrap metrics receiver under carbon receiver inst…
sakulali Nov 1, 2023
fddc10d
[processor/k8sattributes] Fix node/ns labels/annotations extraction (…
dmitryax Nov 1, 2023
b88690a
[processor/remoteobserver] rename to remotetapprocessor (#27874)
atoulme Nov 1, 2023
ad35b39
[Spanmetrics] - Add exemplars to Sum metrics (#28671)
aishyandapalli Nov 1, 2023
59cfbe7
[chore] fix codeowners (#28855)
atoulme Nov 2, 2023
f509060
feat(alertmanager): Add exporter factory and config (#27836)
mcube8 Nov 2, 2023
ae6d36b
Adds duration sampler distinct from latency in supplying two bounds (…
garry-cairns Nov 2, 2023
8913b95
[googlemanagedprometheusexporter] Clarify support status of this expo…
punya Nov 2, 2023
59506f6
[filelogreceiver]: Add ability to sort by mtime (#28850)
BinaryFissionGames Nov 2, 2023
327de9f
[pkg/traslator] move skywalking_to_traces into pkg/translator (#28814)
JaredTan95 Nov 2, 2023
4f5952a
[chore][pkg/stanza] Adjust length of knownFiles based on number of ma…
djaglowski Nov 2, 2023
3e0a21c
[chore][exporter/datadog] Add a section about how to switch to Zorkia…
songy23 Nov 2, 2023
9edf138
[cmd/telemetrygen] Use exporter per worker for better metrics through…
marcelbirkner Nov 2, 2023
0e13821
[scraper/processscraper] Fix TestScrapeMetrics_MuteErrorFlags failure…
michalpristas Nov 2, 2023
61c12ca
[chore][testbed] Do not use export function `carbonreceiver.New` (#28…
sakulali Nov 2, 2023
197a47c
[chore] Run make gendependabot (#28868)
dmitryax Nov 2, 2023
bfb780f
[chore] update codeowners (#28869)
atoulme Nov 2, 2023
b39f83d
[receiver/sshcheck] Change keyfile -> key_file in e.g. config and doc…
nslaughter Nov 2, 2023
040426f
[chore] [extension/jaegerremotesampling] Avoid port conflict in tests…
dmitryax Nov 3, 2023
4abb732
[exporter/azuremonitor] Add Connection String Support to Azure Monito…
rajkumar-rangaraj Nov 3, 2023
9dd2258
[exporter/awsxray] Add aws sdk http error events to x-ray subsegment …
pxaws Nov 3, 2023
f7f856e
[receiver/carbon] do not expose method (#28872)
sakulali Nov 3, 2023
af09177
[chore] update testbed to embed jaeger exporter (#28880)
Nov 3, 2023
3b84eae
Make replication stats return whole number (#28824)
michalpristas Nov 3, 2023
1bfbb18
Retract googlecloud exporter releases that don't have logging (#28884)
dashpole Nov 3, 2023
ad6fa27
[chore] move collectdreceiver shared code to an internal package (#28…
atoulme Nov 6, 2023
6696f7e
[chore] Increase Cache Go step timeout to 25min on Windows (#28859)
pjanotti Nov 6, 2023
1955509
[exporter/datadog] fix(docs): typo with especially (#28996)
karmingc Nov 6, 2023
c53db30
Bump github.com/google/cadvisor from 0.47.3 to 0.48.1 in /receiver/aw…
crobert-1 Nov 7, 2023
dbfa694
[receiver/kafkametrics] Using unique container networks and container…
sakulali Nov 7, 2023
902b1a9
[chore][processort/tailsamplingprocessor] Limit concurrency for certa…
pjanotti Nov 8, 2023
c26444b
Codesmon/exporter/azuremonitor/persistent queue (#26258)
codesmon Nov 8, 2023
cec3e59
[chore] update affiliation (#29019)
Nov 8, 2023
a80edda
[receiver/collectd] move collectdreceiver to beta (#28997)
atoulme Nov 8, 2023
22d86de
[chore] dependabot updates Wed Nov 8 16:58:54 UTC 2023 (#29028)
opentelemetrybot Nov 8, 2023
eb320a1
[chore] dependabot updates Wed Nov 8 18:29:02 UTC 2023 (#29052)
opentelemetrybot Nov 8, 2023
c95d613
[chore] dependabot updates Wed Nov 8 21:01:03 UTC 2023 (#29071)
opentelemetrybot Nov 8, 2023
b595986
[exporter/influxdb] Remove //nolint indent-error-flow (#29073)
yukinakanaka Nov 8, 2023
65b745f
hostmetricsreceiver: remove unused function (#29075)
braydonk Nov 8, 2023
330ff0a
[chore] bump go versions in workflows to 1.20.11 and 1.21.4 (#29080)
adrielp Nov 9, 2023
f4c4485
[all][chore] Moved from interface{} to any for all go code (#29072)
lucasoskorep Nov 9, 2023
57b5dcc
[receiver/dockerstats] rename struct and function to keep expected re…
sakulali Nov 9, 2023
320eff4
[receiver/mongodbatlasreceiver] add provider resource attributes (#28…
JonathanWamsley Nov 9, 2023
b716a4d
[exporter/syslog] Enable component (#28902)
kasia-kujawa Nov 9, 2023
e8116e6
[chore][pkg/stanza]: when found duplicate, continue from outer loop (…
VihasMakwana Nov 10, 2023
bf5a3f8
udp-receiver async - fix data corruption (with buffer pools) (#28898)
hovavza Nov 10, 2023
55a7d9d
[chore][receiver/windowseventlog] remove duplicate function NewFactor…
sakulali Nov 10, 2023
21469b1
[chore][pkg/stanza][exporter/signalfx] One more interface{} -> any an…
songy23 Nov 10, 2023
361b070
[chore][CONTRIBUTING.md] Add triage process link (#29092)
crobert-1 Nov 10, 2023
cd0ffe1
fix(processor/k8sattributes): README was misleading/had typoes (#29108)
lizthegrey Nov 11, 2023
61ba7fd
[processor/k8sattributes] fix(docs): typo for kubernetes label (#29110)
karmingc Nov 11, 2023
1d4cf91
Update doc.go of filelogreceiver (#29100)
ymotongpoo Nov 12, 2023
c9f1f25
[connector/datadog] Set MutatesData to true (#29114)
songy23 Nov 13, 2023
770f1c0
cmd/telemetrygen: add HTTP export for logs (#29078)
axw Nov 13, 2023
a573f50
Merge remote-tracking branch 'upstream/main'
mackjmr Nov 13, 2023
c9ab41e
Merge branch 'main' into mackjmr/merge-main-to-prod-staging
mackjmr Nov 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
[all][chore] Moved from interface{} to any for all go code (open-tele…
…metry#29072)

Additionally added a golangci-lint.yaml update to automatically apply
this change to new code going forward

Fixes open-telemetry#23811

---------

Co-authored-by: Alex Boten <aboten@lightstep.com>
  • Loading branch information
lucasoskorep and Alex Boten committed Nov 9, 2023
commit f4c44858b5c6c1476c1af1c25e7480c753855fe5
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ linters-settings:
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
rewrite-rules:
- pattern: interface{}
replacement: any

goimports:
# put imports beginning with prefix after 3rd-party packages;
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type CfgInfo struct {
// the component type, e.g. "otlpreceiver.Config"
Type component.Type
// an instance of the component's configuration struct
CfgInstance interface{}
CfgInstance any
}

// GetAllCfgInfos accepts a Factories struct, then creates and returns a CfgInfo
Expand Down
12 changes: 6 additions & 6 deletions cmd/configschema/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (

// Field holds attributes and subfields of a config struct.
type Field struct {
Name string `yaml:",omitempty"`
Type string `yaml:",omitempty"`
Kind string `yaml:",omitempty"`
Default interface{} `yaml:",omitempty"`
Doc string `yaml:",omitempty"`
Fields []*Field `yaml:",omitempty"`
Name string `yaml:",omitempty"`
Type string `yaml:",omitempty"`
Kind string `yaml:",omitempty"`
Default any `yaml:",omitempty"`
Doc string `yaml:",omitempty"`
Fields []*Field `yaml:",omitempty"`
}

// ReadFields accepts both a config struct's Value, as well as a DirResolver,
Expand Down
6 changes: 3 additions & 3 deletions cmd/configschema/fields_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

func TestReadFieldsWithDefaults(t *testing.T) {
defaults := map[string]interface{}{
defaults := map[string]any{
"one": "1",
"two": int64(2),
"three": uint64(3),
Expand Down Expand Up @@ -43,7 +43,7 @@ func TestReadFieldsWithDefaults(t *testing.T) {
}

func TestReadFieldsWithoutDefaults(t *testing.T) {
testReadFields(t, testStruct{}, map[string]interface{}{
testReadFields(t, testStruct{}, map[string]any{
"one": "",
"three": uint64(0),
"four": false,
Expand All @@ -53,7 +53,7 @@ func TestReadFieldsWithoutDefaults(t *testing.T) {
})
}

func testReadFields(t *testing.T, s testStruct, defaults map[string]interface{}) {
func testReadFields(t *testing.T, s testStruct, defaults map[string]any) {
root, _ := ReadFields(
reflect.ValueOf(s),
testDR(),
Expand Down
2 changes: 1 addition & 1 deletion cmd/configschema/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestTypetoProjectPath_External(t *testing.T) {
assert.Equal(t, "", dir)
}

func testTypeToPackagePath(t *testing.T, v interface{}) string {
func testTypeToPackagePath(t *testing.T, v any) string {
packageDir, err := testDR().TypeToPackagePath(reflect.ValueOf(v).Type())
require.NoError(t, err)
return packageDir
Expand Down
2 changes: 1 addition & 1 deletion cmd/mdatagen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func templatize(tmplFile string, md metadata) *template.Template {
template.
New(filepath.Base(tmplFile)).
Option("missingkey=error").
Funcs(map[string]interface{}{
Funcs(map[string]any{
"publicVar": func(s string) (string, error) {
return formatIdentifier(s, true)
},
Expand Down
2 changes: 1 addition & 1 deletion confmap/provider/s3provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (fmp *provider) Retrieve(ctx context.Context, uri string, _ confmap.Watcher
// read config from response body
dec := yaml.NewDecoder(resp.Body)
defer resp.Body.Close()
var conf map[string]interface{}
var conf map[string]any
err = dec.Decode(&conf)
if err != nil {
return nil, err
Expand Down
12 changes: 6 additions & 6 deletions connector/exceptionsconnector/connector_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ func TestBuildKeyWithDimensions(t *testing.T) {
for _, tc := range []struct {
name string
optionalDims []dimension
resourceAttrMap map[string]interface{}
spanAttrMap map[string]interface{}
resourceAttrMap map[string]any
spanAttrMap map[string]any
wantKey string
}{
{
Expand All @@ -273,7 +273,7 @@ func TestBuildKeyWithDimensions(t *testing.T) {
optionalDims: []dimension{
{name: "foo"},
},
spanAttrMap: map[string]interface{}{
spanAttrMap: map[string]any{
"foo": 99,
},
wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u000099",
Expand All @@ -283,7 +283,7 @@ func TestBuildKeyWithDimensions(t *testing.T) {
optionalDims: []dimension{
{name: "foo"},
},
resourceAttrMap: map[string]interface{}{
resourceAttrMap: map[string]any{
"foo": 99,
},
wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u000099",
Expand All @@ -293,10 +293,10 @@ func TestBuildKeyWithDimensions(t *testing.T) {
optionalDims: []dimension{
{name: "foo"},
},
spanAttrMap: map[string]interface{}{
spanAttrMap: map[string]any{
"foo": 100,
},
resourceAttrMap: map[string]interface{}{
resourceAttrMap: map[string]any{
"foo": 99,
},
wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u0000100",
Expand Down
2 changes: 1 addition & 1 deletion connector/routingconnector/internal/common/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func createRouteFunction[K any](_ ottl.FunctionContext, _ ottl.Arguments) (ottl.ExprFunc[K], error) {
return func(context.Context, K) (interface{}, error) {
return func(context.Context, K) (any, error) {
return true, nil
}, nil
}
Expand Down
12 changes: 6 additions & 6 deletions connector/spanmetricsconnector/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ func TestBuildKeyWithDimensions(t *testing.T) {
for _, tc := range []struct {
name string
optionalDims []dimension
resourceAttrMap map[string]interface{}
spanAttrMap map[string]interface{}
resourceAttrMap map[string]any
spanAttrMap map[string]any
wantKey string
}{
{
Expand All @@ -520,7 +520,7 @@ func TestBuildKeyWithDimensions(t *testing.T) {
optionalDims: []dimension{
{name: "foo"},
},
spanAttrMap: map[string]interface{}{
spanAttrMap: map[string]any{
"foo": 99,
},
wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u000099",
Expand All @@ -530,7 +530,7 @@ func TestBuildKeyWithDimensions(t *testing.T) {
optionalDims: []dimension{
{name: "foo"},
},
resourceAttrMap: map[string]interface{}{
resourceAttrMap: map[string]any{
"foo": 99,
},
wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u000099",
Expand All @@ -540,10 +540,10 @@ func TestBuildKeyWithDimensions(t *testing.T) {
optionalDims: []dimension{
{name: "foo"},
},
spanAttrMap: map[string]interface{}{
spanAttrMap: map[string]any{
"foo": 100,
},
resourceAttrMap: map[string]interface{}{
resourceAttrMap: map[string]any{
"foo": 99,
},
wantKey: "ab\u0000c\u0000SPAN_KIND_UNSPECIFIED\u0000STATUS_CODE_UNSET\u0000100",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func resourceToLogContents(resource pcommon.Resource) []*sls.LogContent {
}
}

fields := map[string]interface{}{}
fields := map[string]any{}
attrs.Range(func(k string, v pcommon.Value) bool {
if k == conventions.AttributeServiceName || k == conventions.AttributeHostName {
return true
Expand Down Expand Up @@ -144,7 +144,7 @@ func mapLogRecordToLogService(lr plog.LogRecord,
Value: proto.String(lr.SeverityText()),
})

fields := map[string]interface{}{}
fields := map[string]any{}
lr.Attributes().Range(func(k string, v pcommon.Value) bool {
fields[k] = v.AsString()
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ func statusCodeToShortString(code ptrace.StatusCode) string {
}

func eventsToString(events ptrace.SpanEventSlice) string {
eventArray := make([]map[string]interface{}, 0, events.Len())
eventArray := make([]map[string]any, 0, events.Len())
for i := 0; i < events.Len(); i++ {
spanEvent := events.At(i)
event := map[string]interface{}{}
event := map[string]any{}
event[nameField] = spanEvent.Name()
event[timeField] = spanEvent.Timestamp()
event[attributeField] = spanEvent.Attributes().AsRaw()
Expand All @@ -192,10 +192,10 @@ func eventsToString(events ptrace.SpanEventSlice) string {
}

func spanLinksToString(spanLinkSlice ptrace.SpanLinkSlice) string {
linkArray := make([]map[string]interface{}, 0, spanLinkSlice.Len())
linkArray := make([]map[string]any, 0, spanLinkSlice.Len())
for i := 0; i < spanLinkSlice.Len(); i++ {
spanLink := spanLinkSlice.At(i)
link := map[string]interface{}{}
link := map[string]any{}
link[spanIDField] = traceutil.SpanIDToHexOrEmptyString(spanLink.SpanID())
link[traceIDField] = traceutil.TraceIDToHexOrEmptyString(spanLink.TraceID())
link[attributeField] = spanLink.Attributes().AsRaw()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestTraceDataToLogService(t *testing.T) {
}
}

func loadFromJSON(file string, obj interface{}) error {
func loadFromJSON(file string, obj any) error {
blob, err := os.ReadFile(file)
if err == nil {
err = json.Unmarshal(blob, obj)
Expand Down Expand Up @@ -97,7 +97,7 @@ func fillResource(resource pcommon.Resource) {
}

func fillHTTPClientSpan(span ptrace.Span) {
attributes := make(map[string]interface{})
attributes := make(map[string]any)
attributes[conventions.AttributeHTTPMethod] = "GET"
attributes[conventions.AttributeHTTPURL] = "https://api.example.com/users/junit"
attributes[conventions.AttributeHTTPStatusCode] = 200
Expand Down Expand Up @@ -129,7 +129,7 @@ func fillHTTPClientSpan(span ptrace.Span) {
}

func fillHTTPServerSpan(span ptrace.Span) {
attributes := make(map[string]interface{})
attributes := make(map[string]any)
attributes[conventions.AttributeHTTPMethod] = "GET"
attributes[conventions.AttributeHTTPURL] = "https://api.example.com/users/junit"
attributes[conventions.AttributeHTTPClientIP] = "192.168.15.32"
Expand All @@ -151,7 +151,7 @@ func fillHTTPServerSpan(span ptrace.Span) {
status.SetMessage("something error")
}

func constructSpanAttributes(attributes map[string]interface{}) pcommon.Map {
func constructSpanAttributes(attributes map[string]any) pcommon.Map {
attrs := pcommon.NewMap()
for key, value := range attributes {
if cast, ok := value.(int); ok {
Expand Down
24 changes: 12 additions & 12 deletions exporter/awscloudwatchlogsexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,18 @@ func pushLogsToCWLogs(logger *zap.Logger, ld plog.Logs, config *Config, pusher c
}

type cwLogBody struct {
Body interface{} `json:"body,omitempty"`
SeverityNumber int32 `json:"severity_number,omitempty"`
SeverityText string `json:"severity_text,omitempty"`
DroppedAttributesCount uint32 `json:"dropped_attributes_count,omitempty"`
Flags uint32 `json:"flags,omitempty"`
TraceID string `json:"trace_id,omitempty"`
SpanID string `json:"span_id,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
Resource map[string]interface{} `json:"resource,omitempty"`
Body any `json:"body,omitempty"`
SeverityNumber int32 `json:"severity_number,omitempty"`
SeverityText string `json:"severity_text,omitempty"`
DroppedAttributesCount uint32 `json:"dropped_attributes_count,omitempty"`
Flags uint32 `json:"flags,omitempty"`
TraceID string `json:"trace_id,omitempty"`
SpanID string `json:"span_id,omitempty"`
Attributes map[string]any `json:"attributes,omitempty"`
Resource map[string]any `json:"resource,omitempty"`
}

func logToCWLog(resourceAttrs map[string]interface{}, log plog.LogRecord, config *Config) (*cwlogs.Event, error) {
func logToCWLog(resourceAttrs map[string]any, log plog.LogRecord, config *Config) (*cwlogs.Event, error) {
// TODO(jbd): Benchmark and improve the allocations.
// Evaluate go.elastic.co/fastjson as a replacement for encoding/json.
logGroupName := config.LogGroupName
Expand Down Expand Up @@ -232,11 +232,11 @@ func logToCWLog(resourceAttrs map[string]interface{}, log plog.LogRecord, config
}, nil
}

func attrsValue(attrs pcommon.Map) map[string]interface{} {
func attrsValue(attrs pcommon.Map) map[string]any {
if attrs.Len() == 0 {
return nil
}
out := make(map[string]interface{}, attrs.Len())
out := make(map[string]any, attrs.Len())
attrs.Range(func(k string, v pcommon.Value) bool {
out[k] = v.AsRaw()
return true
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsemfexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ func (config *Config) Validate() error {

}

func newEMFSupportedUnits() map[string]interface{} {
unitIndexer := map[string]interface{}{}
func newEMFSupportedUnits() map[string]any {
unitIndexer := map[string]any{}
for _, unit := range []string{"Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes",
"Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits",
"Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second",
Expand Down
8 changes: 4 additions & 4 deletions exporter/awsemfexporter/datapoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type emfCalculators struct {
summary aws.MetricCalculator
}

func calculateSummaryDelta(prev *aws.MetricValue, val interface{}, _ time.Time) (interface{}, bool) {
func calculateSummaryDelta(prev *aws.MetricValue, val any, _ time.Time) (any, bool) {
metricEntry := val.(summaryMetricEntry)
summaryDelta := metricEntry.sum
countDelta := metricEntry.count
Expand All @@ -44,7 +44,7 @@ func calculateSummaryDelta(prev *aws.MetricValue, val interface{}, _ time.Time)
// dataPoint represents a processed metric data point
type dataPoint struct {
name string
value interface{}
value any
labels map[string]string
timestampMs int64
}
Expand Down Expand Up @@ -126,7 +126,7 @@ func (dps numberDataPointSlice) CalculateDeltaDatapoints(i int, instrumentationS
retained := true

if dps.adjustToDelta {
var deltaVal interface{}
var deltaVal any
mKey := aws.NewKey(dps.deltaMetricMetadata, labels)
deltaVal, retained = calculators.delta.Calculate(mKey, metricVal, metric.Timestamp().AsTime())

Expand Down Expand Up @@ -299,7 +299,7 @@ func (dps summaryDataPointSlice) CalculateDeltaDatapoints(i int, instrumentation
datapoints := []dataPoint{}

if dps.adjustToDelta {
var delta interface{}
var delta any
mKey := aws.NewKey(dps.deltaMetricMetadata, labels)
delta, retained = calculators.summary.Calculate(mKey, summaryMetricEntry{sum, count}, metric.Timestamp().AsTime())

Expand Down
Loading