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

feat: support pyroscope Push #86

Merged
merged 1 commit into from
May 31, 2024
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
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ module github.com/metrico/otel-collector
go 1.21

require (
connectrpc.com/connect v1.16.2
github.com/ClickHouse/clickhouse-go/v2 v2.17.1
github.com/KimMachineGun/automemlimit v0.5.0
github.com/go-faster/city v1.0.1
github.com/go-logfmt/logfmt v0.6.0
github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07
github.com/gorilla/mux v1.8.1
github.com/grafana/jfr-parser v0.8.0
github.com/grafana/pyroscope/api v0.4.0
github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.98.0
github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0
github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.98.0
Expand Down Expand Up @@ -368,7 +371,6 @@ require (
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.3 // indirect
github.com/gophercloud/gophercloud v1.8.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gosnmp/gosnmp v1.37.0 // indirect
github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 // indirect
Expand Down
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ code.cloudfoundry.org/go-loggregator v7.4.0+incompatible h1:KqZYloMQWM5Zg/BQKunO
code.cloudfoundry.org/go-loggregator v7.4.0+incompatible/go.mod h1:KPBTRqj+y738Nhf1+g4JHFaBU8j7dedirR5ETNHvMXU=
code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78 h1:mrZQaZmuDIPhSp6b96b+CRKC2uH44ifa5cjDV2epKis=
code.cloudfoundry.org/rfc5424 v0.0.0-20201103192249-000122071b78/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4=
connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE=
connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc=
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
Expand Down Expand Up @@ -716,6 +718,9 @@ github.com/grafana/jfr-parser v0.8.0 h1:/uo2wZNXrxw7tKLFwP2omJ3EQGMkD9wzhPsRogVo
github.com/grafana/jfr-parser v0.8.0/go.mod h1:M5u1ux34Qo47ZBWksbMYVk40s7dvU3WMVYpxweEu4R0=
github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37 h1:w59bmBeLOk4enGtyX4kTBNY3FCw/nwDTYUqcjC4vKhg=
github.com/grafana/loki/pkg/push v0.0.0-20231127162423-bd505f8e2d37/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0=
github.com/grafana/pyroscope v1.5.0/go.mod h1:rg53VGcqOf3FawAcAUpkcNNF7+gV1VZFbZY9Gfxry+c=
github.com/grafana/pyroscope/api v0.4.0 h1:J86DxoNeLOvtJhB1Cn65JMZkXe682D+RqeoIUiYc/eo=
github.com/grafana/pyroscope/api v0.4.0/go.mod h1:MFnZNeUM4RDsDOnbgKW3GWoLSBpLzMMT9nkvhHHo81o=
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww=
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
Expand Down
6 changes: 3 additions & 3 deletions receiver/pyroscopereceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

// Configures supported protocols
type Protocols struct {
// Http.MaxRequestBodySize configures max uncompressed body size in bytes
Http *confighttp.ServerConfig `mapstructure:"http"`
// HTTP.MaxRequestBodySize configures max uncompressed body size in bytes
HTTP *confighttp.ServerConfig `mapstructure:"http"`
}

// Represents the receiver config within the collector's config.yaml
Expand All @@ -29,7 +29,7 @@ func (cfg *Config) Validate() error {
if cfg.Timeout <= 0 {
return fmt.Errorf("timeout must be positive")
}
if cfg.Protocols.Http.MaxRequestBodySize < 1 {
if cfg.Protocols.HTTP.MaxRequestBodySize < 1 {
return fmt.Errorf("max_request_body_size must be positive")
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion receiver/pyroscopereceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
func createDefaultConfig() component.Config {
return &Config{
Protocols: Protocols{
Http: &confighttp.ServerConfig{
HTTP: &confighttp.ServerConfig{
Endpoint: defaultHttpAddr,
MaxRequestBodySize: defaultMaxRequestBodySize,
},
Expand Down
Loading
Loading