Skip to content

Adopt Smart Agent v5.10.2 #354

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

Merged
merged 2 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ VERSION=$(shell git describe --match "v[0-9]*" HEAD)
BUILD_X1=-X $(BUILD_INFO_IMPORT_PATH).Version=$(VERSION)
BUILD_INFO=-ldflags "${BUILD_X1}"

SMART_AGENT_RELEASE=v5.9.1
SMART_AGENT_RELEASE=v5.10.2
SKIP_COMPILE=false

### FUNCTIONS
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG SMART_AGENT_RELEASE=v5.9.1
ARG SMART_AGENT_RELEASE=v5.10.2
ARG ALPINE_VERSION=3.12

FROM alpine:${ALPINE_VERSION} as certs
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.25.1-0.20210427211609-b747cdc7e2d9
github.com/openzipkin/zipkin-go v0.2.5
github.com/signalfx/defaults v1.2.2-0.20180531161417-70562fe60657
github.com/signalfx/golib/v3 v3.3.16
github.com/signalfx/signalfx-agent v1.0.1-0.20210325135021-a18ea9d77b40
github.com/signalfx/golib/v3 v3.3.33
github.com/signalfx/signalfx-agent v1.0.1-0.20210503202607-8862b3ba9c0d
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cast v1.3.1
github.com/stretchr/testify v1.7.0
Expand Down Expand Up @@ -70,7 +70,7 @@ replace (
code.cloudfoundry.org/go-loggregator => github.com/signalfx/go-loggregator v1.0.1-0.20200205155641-5ba5ca92118d
github.com/influxdata/telegraf => github.com/signalfx/telegraf v0.10.2-0.20201211214327-200738592ced
github.com/prometheus/prometheus => github.com/prometheus/prometheus v1.8.2-0.20201105135750-00f16d1ac3a4
github.com/signalfx/signalfx-agent/pkg/apm => github.com/signalfx/signalfx-agent/pkg/apm v0.0.0-20210325135021-a18ea9d77b40
github.com/signalfx/signalfx-agent/pkg/apm => github.com/signalfx/signalfx-agent/pkg/apm v0.0.0-20210503202607-8862b3ba9c0d
github.com/soheilhy/cmux => github.com/soheilhy/cmux v0.1.5-0.20210205191134-5ec6847320e5 // required for smartagentreceiver to drop google.golang.org/grpc/examples/helloworld/helloworld test dep
google.golang.org/grpc => google.golang.org/grpc v1.29.1 // required for smartagentreceiver's go.etcd.io/etcd dep
)
44 changes: 18 additions & 26 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/buildscripts/packaging/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ ENV PACKAGE="deb"
ENV VERSION=""
ENV ARCH="amd64"
ENV OUTPUT_DIR="/repo/dist/"
ENV SMART_AGENT_RELEASE="v5.9.1"
ENV SMART_AGENT_RELEASE="v5.10.2"

CMD ./internal/buildscripts/packaging/fpm/$PACKAGE/build.sh "$VERSION" "$ARCH" "$OUTPUT_DIR" "$SMART_AGENT_RELEASE"
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ COPY ./docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod a+x /work/build.sh /docker-entrypoint.sh

ENV OUTPUT_DIR=project/dist
ENV SMART_AGENT_RELEASE=5.9.1
ENV SMART_AGENT_RELEASE=5.10.2

ENTRYPOINT ["/docker-entrypoint.sh"]
1 change: 1 addition & 0 deletions internal/extension/smartagentextension/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ func defaultConfig() Config {
File: file.Config{
PollRateSeconds: 5,
},
RemoteWatch: &tru,
},
},
}
Expand Down
21 changes: 11 additions & 10 deletions tests/testutils/pdata_to_resource_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ func PDataToResourceMetrics(pdataMetrics ...pdata.Metrics) (ResourceMetrics, err
for i := 0; i < numRM; i++ {
rm := ResourceMetric{}
pdataRM := pdataRMs.At(i)
pdataRM.Resource().Attributes().ForEach(
func(k string, v pdata.AttributeValue) {
pdataRM.Resource().Attributes().Range(
func(k string, v pdata.AttributeValue) bool {
addResourceAttribute(&rm, k, v)
return true
},
)
pdataILMs := pdataRM.InstrumentationLibraryMetrics()
Expand Down Expand Up @@ -86,9 +87,9 @@ func addDoubleSum(ilms *InstrumentationLibraryMetrics, metric pdata.Metric) {
dp := doubleSum.DataPoints().At(l)
val := dp.Value()
labels := map[string]string{}
dp.LabelsMap().ForEach(func(k, v string) {
dp.LabelsMap().Range(func(k, v string) bool {
labels[k] = v

return true
})
metric := Metric{
Name: metric.Name(),
Expand Down Expand Up @@ -155,9 +156,9 @@ func addIntSum(ilms *InstrumentationLibraryMetrics, metric pdata.Metric) {
dp := intSum.DataPoints().At(l)
val := dp.Value()
labels := map[string]string{}
dp.LabelsMap().ForEach(func(k, v string) {
dp.LabelsMap().Range(func(k, v string) bool {
labels[k] = v

return true
})
metric := Metric{
Name: metric.Name(),
Expand All @@ -177,9 +178,9 @@ func addDoubleGauge(ilms *InstrumentationLibraryMetrics, metric pdata.Metric) {
dp := doubleGauge.DataPoints().At(l)
val := dp.Value()
labels := map[string]string{}
dp.LabelsMap().ForEach(func(k, v string) {
dp.LabelsMap().Range(func(k, v string) bool {
labels[k] = v

return true
})
metric := Metric{
Name: metric.Name(),
Expand All @@ -199,9 +200,9 @@ func addIntGauge(ilms *InstrumentationLibraryMetrics, metric pdata.Metric) {
dp := intGauge.DataPoints().At(l)
val := dp.Value()
labels := map[string]string{}
dp.LabelsMap().ForEach(func(k, v string) {
dp.LabelsMap().Range(func(k, v string) bool {
labels[k] = v

return true
})
metric := Metric{
Name: metric.Name(),
Expand Down