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

influxdbexporter and influxdbreceiver: update #4277

Merged
merged 2 commits into from
Jul 21, 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
25 changes: 3 additions & 22 deletions exporter/influxdbexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,9 @@ import (
"github.com/influxdata/influxdb-observability/otel2influx"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/consumer/consumererror"
"go.opentelemetry.io/collector/model/otlp"
"go.opentelemetry.io/collector/model/pdata"
)

var (
tracesMarshaler = otlp.NewProtobufTracesMarshaler()
metricsMarshaler = otlp.NewProtobufMetricsMarshaler()
logsMarshaler = otlp.NewProtobufLogsMarshaler()
)

type tracesExporter struct {
logger common.Logger
cfg *Config
Expand All @@ -53,11 +46,7 @@ func newTracesExporter(config *Config, params component.ExporterCreateSettings)
func (e *tracesExporter) pushTraces(ctx context.Context, td pdata.Traces) error {
batch := e.writer.newBatch()

protoBytes, err := tracesMarshaler.MarshalTraces(td)
if err != nil {
return consumererror.Permanent(err)
}
err = e.converter.WriteTracesFromRequestBytes(ctx, protoBytes, batch)
err := e.converter.WriteTraces(ctx, td, batch)
if err != nil {
return consumererror.Permanent(err)
}
Expand Down Expand Up @@ -110,11 +99,7 @@ func newMetricsExporter(config *Config, params component.ExporterCreateSettings)
func (e *metricsExporter) pushMetrics(ctx context.Context, md pdata.Metrics) error {
batch := e.writer.newBatch()

protoBytes, err := metricsMarshaler.MarshalMetrics(md)
if err != nil {
return consumererror.Permanent(err)
}
err = e.converter.WriteMetricsFromRequestBytes(ctx, protoBytes, batch)
err := e.converter.WriteMetrics(ctx, md, batch)
if err != nil {
return consumererror.Permanent(err)
}
Expand Down Expand Up @@ -154,11 +139,7 @@ func newLogsExporter(config *Config, params component.ExporterCreateSettings) *l
func (e *logsExporter) pushLogs(ctx context.Context, ld pdata.Logs) error {
batch := e.writer.newBatch()

protoBytes, err := logsMarshaler.MarshalLogs(ld)
if err != nil {
return consumererror.Permanent(err)
}
err = e.converter.WriteLogsFromRequestBytes(ctx, protoBytes, batch)
err := e.converter.WriteLogs(ctx, ld, batch)
if err != nil {
return consumererror.Permanent(err)
}
Expand Down
6 changes: 3 additions & 3 deletions exporter/influxdbexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influx
go 1.16

require (
github.com/influxdata/influxdb-observability/common v0.1.0
github.com/influxdata/influxdb-observability/otel2influx v0.1.0
github.com/influxdata/line-protocol/v2 v2.0.0-20210428091617-0567a5134992
github.com/influxdata/influxdb-observability/common v0.2.0
github.com/influxdata/influxdb-observability/otel2influx v0.2.0
github.com/influxdata/line-protocol/v2 v2.0.0-20210520103755-6551a972d603
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.30.2-0.20210719230137-809cae954ed3
go.opentelemetry.io/collector/model v0.30.2-0.20210719230137-809cae954ed3
Expand Down
24 changes: 14 additions & 10 deletions exporter/influxdbexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY=
github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk=
github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
Expand Down Expand Up @@ -634,21 +636,23 @@ github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2w
github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA=
github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ=
github.com/influxdata/influxdb v1.9.2/go.mod h1:UEe3MeD9AaP5rlPIes102IhYua3FhIWZuOXNHxDjSrI=
github.com/influxdata/influxdb-observability/common v0.0.0-20210503043157-6ea7daf489f3/go.mod h1:PMngVYsW4uwtzIVmj0ZfLL9UIOwo7Vs+09QHkoYMZv8=
github.com/influxdata/influxdb-observability/common v0.1.0 h1:ZMZkAgoU1KckYXtjrP9VemqeTrbJRwJrC+CPrSPAnLY=
github.com/influxdata/influxdb-observability/common v0.1.0/go.mod h1:LynmG92zQlDsATlw2q2RyVTdMcXxo7mMuT1e5+0//HU=
github.com/influxdata/influxdb-observability/otel2influx v0.1.0 h1:yZvi4if3Dr+cL0EM1mVR80d45AKb7jeNuLGdkb83Esw=
github.com/influxdata/influxdb-observability/otel2influx v0.1.0/go.mod h1:gWN7iMQiw0cufAf7CN0WQrL2BDlrgnpzsFywgwOXoW4=
github.com/influxdata/influxdb-observability/otlp v0.0.0-20210605003714-a868e4b21ba8 h1:j2Ei8Z4OMUfSEvWCikYRxjkkw6eBiMxlOhc7izs1hts=
github.com/influxdata/influxdb-observability/otlp v0.0.0-20210605003714-a868e4b21ba8/go.mod h1:23SLY21Ag84PC0TbvVhdKoOVvrQF6nq5j5sFOW09ZBU=
github.com/influxdata/influxdb-observability/common v0.1.1/go.mod h1:TA+gA3DRQXJ8FAhvAdeOsy9RGTdAFZBx6vFGxhbhYbI=
github.com/influxdata/influxdb-observability/common v0.2.0 h1:m20dvNhuUPbINVJkIvW5/3hQVIFHUYsGkN0Gj6/AG9o=
github.com/influxdata/influxdb-observability/common v0.2.0/go.mod h1:9lqc6Wv6mZKB6kD3pGTyRUEh0RC34cYG6NEwsbFxvbU=
github.com/influxdata/influxdb-observability/otel2influx v0.2.0 h1:IPaNTkiKZQZtuGpwyIQC5/KUuuOi8Bnq2g9SI6CjNRY=
github.com/influxdata/influxdb-observability/otel2influx v0.2.0/go.mod h1:PxqOsO5mxONWw2YiBGjjhG+JLICjTD8BrSRh3C1Hwdo=
github.com/influxdata/influxdb-observability/otlp v0.1.0/go.mod h1:dUIflut4U5fjtFcU0FUQPKvnN/eF3lR1m4Zt3PNe8cg=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo=
github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk=
github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e h1:/o3vQtpWJhvnIbXley4/jwzzqNeigJK9z+LZcJZ9zfM=
github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE=
github.com/influxdata/line-protocol/v2 v2.0.0-20210428091617-0567a5134992 h1:bvd+v422XMzbuLvkfRSXyV9Lt/v05Zi80D//kUeS1yU=
github.com/influxdata/line-protocol/v2 v2.0.0-20210428091617-0567a5134992/go.mod h1:6+9Xt5Sq1rWx+glMgxhcg2c0DUaehK+5TDcPZ76GypY=
github.com/influxdata/line-protocol-corpus v0.0.0-20210519164801-ca6fa5da0184 h1:modYba1g1we+YJf0yGTwmohVWVAxcAch18nPg3e24OY=
github.com/influxdata/line-protocol-corpus v0.0.0-20210519164801-ca6fa5da0184/go.mod h1:03nmhxzZ7Xk2pdG+lmMd7mHDfeVOYFyhOgwO61qWU98=
github.com/influxdata/line-protocol/v2 v2.0.0-20210312151457-c52fdecb625a/go.mod h1:6+9Xt5Sq1rWx+glMgxhcg2c0DUaehK+5TDcPZ76GypY=
github.com/influxdata/line-protocol/v2 v2.0.0-20210520103755-6551a972d603 h1:ia96+xt3Z0lh8glUXFsXATBwTzU9tmTXqnVsBd5r8ME=
github.com/influxdata/line-protocol/v2 v2.0.0-20210520103755-6551a972d603/go.mod h1:QKw43hdUBg3GTk2iC3iyCxksNj7PX9aUSeYOYE/ceHY=
github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk=
github.com/influxdata/pkg-config v0.2.7/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk=
github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8=
Expand Down
2 changes: 1 addition & 1 deletion exporter/influxdbexporter/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (b *influxHTTPWriterBatch) convertFields(m map[string]interface{}) (fields
if k == "" {
b.logger.Debug("empty field key")
} else if lpv, ok := lineprotocol.NewValue(v); !ok {
b.logger.Debug("invalid field value %q for key %q", v, k)
b.logger.Debug("invalid field value", "key", k, "value", v)
} else {
fields[k] = lpv
}
Expand Down
28 changes: 16 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,10 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2
github.com/frankban/quicktest v1.7.3/go.mod h1:V1d2J5pfxYH6EjBAgSK7YNXcXlTWxUHdE1sVDXkjnig=
github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY=
github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk=
github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
Expand Down Expand Up @@ -1071,24 +1073,26 @@ github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:
github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ=
github.com/influxdata/influxdb v1.8.4/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI=
github.com/influxdata/influxdb v1.9.2/go.mod h1:UEe3MeD9AaP5rlPIes102IhYua3FhIWZuOXNHxDjSrI=
github.com/influxdata/influxdb-observability/common v0.0.0-20210503043157-6ea7daf489f3/go.mod h1:PMngVYsW4uwtzIVmj0ZfLL9UIOwo7Vs+09QHkoYMZv8=
github.com/influxdata/influxdb-observability/common v0.1.0 h1:ZMZkAgoU1KckYXtjrP9VemqeTrbJRwJrC+CPrSPAnLY=
github.com/influxdata/influxdb-observability/common v0.1.0/go.mod h1:LynmG92zQlDsATlw2q2RyVTdMcXxo7mMuT1e5+0//HU=
github.com/influxdata/influxdb-observability/influx2otel v0.1.0 h1:ZM50JMI+K7tK+EMiCE4H8ENwdS475LNdogcSMCPvSCs=
github.com/influxdata/influxdb-observability/influx2otel v0.1.0/go.mod h1:DGy5/YNkWR07nYrdGmYW3hGkz1pz3LamCJGX/fgTW+Q=
github.com/influxdata/influxdb-observability/otel2influx v0.1.0 h1:yZvi4if3Dr+cL0EM1mVR80d45AKb7jeNuLGdkb83Esw=
github.com/influxdata/influxdb-observability/otel2influx v0.1.0/go.mod h1:gWN7iMQiw0cufAf7CN0WQrL2BDlrgnpzsFywgwOXoW4=
github.com/influxdata/influxdb-observability/otlp v0.0.0-20210605003714-a868e4b21ba8 h1:j2Ei8Z4OMUfSEvWCikYRxjkkw6eBiMxlOhc7izs1hts=
github.com/influxdata/influxdb-observability/otlp v0.0.0-20210605003714-a868e4b21ba8/go.mod h1:23SLY21Ag84PC0TbvVhdKoOVvrQF6nq5j5sFOW09ZBU=
github.com/influxdata/influxdb-observability/common v0.1.1/go.mod h1:TA+gA3DRQXJ8FAhvAdeOsy9RGTdAFZBx6vFGxhbhYbI=
github.com/influxdata/influxdb-observability/common v0.2.0 h1:m20dvNhuUPbINVJkIvW5/3hQVIFHUYsGkN0Gj6/AG9o=
github.com/influxdata/influxdb-observability/common v0.2.0/go.mod h1:9lqc6Wv6mZKB6kD3pGTyRUEh0RC34cYG6NEwsbFxvbU=
github.com/influxdata/influxdb-observability/influx2otel v0.2.0 h1:qW1kmFiEIkBf3eT7ZFb17bxDx+bGajrL6jx0KZ1bUs8=
github.com/influxdata/influxdb-observability/influx2otel v0.2.0/go.mod h1:VlObtNUYXNqqGPWCjYwteu+/bMdO/dW0frj6G6wtHsE=
github.com/influxdata/influxdb-observability/otel2influx v0.2.0 h1:IPaNTkiKZQZtuGpwyIQC5/KUuuOi8Bnq2g9SI6CjNRY=
github.com/influxdata/influxdb-observability/otel2influx v0.2.0/go.mod h1:PxqOsO5mxONWw2YiBGjjhG+JLICjTD8BrSRh3C1Hwdo=
github.com/influxdata/influxdb-observability/otlp v0.1.0/go.mod h1:dUIflut4U5fjtFcU0FUQPKvnN/eF3lR1m4Zt3PNe8cg=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo=
github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk=
github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk=
github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e h1:/o3vQtpWJhvnIbXley4/jwzzqNeigJK9z+LZcJZ9zfM=
github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE=
github.com/influxdata/line-protocol/v2 v2.0.0-20210428091617-0567a5134992 h1:bvd+v422XMzbuLvkfRSXyV9Lt/v05Zi80D//kUeS1yU=
github.com/influxdata/line-protocol/v2 v2.0.0-20210428091617-0567a5134992/go.mod h1:6+9Xt5Sq1rWx+glMgxhcg2c0DUaehK+5TDcPZ76GypY=
github.com/influxdata/line-protocol-corpus v0.0.0-20210519164801-ca6fa5da0184 h1:modYba1g1we+YJf0yGTwmohVWVAxcAch18nPg3e24OY=
github.com/influxdata/line-protocol-corpus v0.0.0-20210519164801-ca6fa5da0184/go.mod h1:03nmhxzZ7Xk2pdG+lmMd7mHDfeVOYFyhOgwO61qWU98=
github.com/influxdata/line-protocol/v2 v2.0.0-20210312151457-c52fdecb625a/go.mod h1:6+9Xt5Sq1rWx+glMgxhcg2c0DUaehK+5TDcPZ76GypY=
github.com/influxdata/line-protocol/v2 v2.0.0-20210520103755-6551a972d603 h1:ia96+xt3Z0lh8glUXFsXATBwTzU9tmTXqnVsBd5r8ME=
github.com/influxdata/line-protocol/v2 v2.0.0-20210520103755-6551a972d603/go.mod h1:QKw43hdUBg3GTk2iC3iyCxksNj7PX9aUSeYOYE/ceHY=
github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk=
github.com/influxdata/pkg-config v0.2.7/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk=
github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8=
Expand Down
11 changes: 4 additions & 7 deletions receiver/influxdbreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@ Write responses:
The following configuration options are supported:

* `endpoint` (default = 0.0.0.0:8086) HTTP service endpoint for the line protocol receiver
* `metrics_schema` (default = telegraf-prometheus-v1) The chosen metrics schema to parse; must be one of:
* `telegraf-prometheus-v1`
* `telegraf-prometheus-v2`


The full list of settings exposed for this receiver are documented in [config.go](config.go).

Example:
```yaml
receivers:
influxdb:
endpoint: 0.0.0.0:8080
metrics_schema: telegraf-prometheus-v1
```

## Definitions
Expand All @@ -44,8 +40,9 @@ Telegraf has [hundreds of plugins](https://www.influxdata.com/products/integrati
## Schema

The InfluxDB->OpenTelemetry conversion [schema](https://github.com/influxdata/influxdb-observability/blob/main/docs/index.md) and [implementation](https://github.com/influxdata/influxdb-observability/tree/main/influx2otel) are hosted at https://github.com/influxdata/influxdb-observability .
This receiver automatically detects schema at parse time.

### Example: Metrics - `telegraf-prometheus-v1`
### Example: Metrics - `prometheus-v1`
```
cpu_temp,foo=bar gauge=87.332
http_requests_total,method=post,code=200 counter=1027
Expand All @@ -54,7 +51,7 @@ http_request_duration_seconds 0.05=24054,0.1=33444,0.2=100392,0.5=129389,1=13398
rpc_duration_seconds 0.01=3102,0.05=3272,0.5=4773,0.9=9001,0.99=76656,sum=1.7560473e+07,count=2693
```

### Example: Metrics - `telegraf-prometheus-v2`
### Example: Metrics - `prometheus-v2`
```
prometheus,foo=bar cpu_temp=87.332
prometheus,method=post,code=200 http_requests_total=1027
Expand Down
6 changes: 0 additions & 6 deletions receiver/influxdbreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,4 @@ import (
type Config struct {
config.ReceiverSettings `mapstructure:"-"`
confighttp.HTTPServerSettings `mapstructure:",squash"`

// MetricsSchema indicates the metrics schema to emit to line protocol.
// Options:
// - telegraf-prometheus-v1
// - telegraf-prometheus-v2
MetricsSchema string `mapstructure:"metrics_schema"`
Copy link
Member

Choose a reason for hiding this comment

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

I know we are still allowed to make breaking changes, but you could have been nicer to your users and deprecating this option first, leaving a big warning in the logs in case this is being used. And effectively remove it in a couple of releases.

}
1 change: 0 additions & 1 deletion receiver/influxdbreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func createDefaultConfig() config.Receiver {
HTTPServerSettings: confighttp.HTTPServerSettings{
Endpoint: "0.0.0.0:8086",
},
MetricsSchema: "telegraf-prometheus-v1",
}
}

Expand Down
7 changes: 3 additions & 4 deletions receiver/influxdbreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ go 1.16

require (
github.com/gorilla/mux v1.8.0
github.com/influxdata/influxdb-observability/common v0.1.0
github.com/influxdata/influxdb-observability/influx2otel v0.1.0
github.com/influxdata/line-protocol/v2 v2.0.0-20210428091617-0567a5134992
github.com/influxdata/influxdb-observability/common v0.2.0
github.com/influxdata/influxdb-observability/influx2otel v0.2.0
github.com/influxdata/line-protocol/v2 v2.0.0-20210520103755-6551a972d603
go.opentelemetry.io/collector v0.30.2-0.20210719230137-809cae954ed3
go.opentelemetry.io/collector/model v0.30.2-0.20210719230137-809cae954ed3
go.uber.org/zap v1.18.1
)
Loading