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

[receiver/Flinkmetricsreceiver] Apache Flink Metric Receiver #10121

Merged
merged 36 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4608f4e
wip before integration and concurrency
JonathanWamsley May 10, 2022
9180137
tidy up client names
JonathanWamsley May 13, 2022
9d9afc3
wip integration test
JonathanWamsley May 13, 2022
5e6345b
wip integration test
JonathanWamsley May 13, 2022
e2bc891
update to flinkmetrics and integration test
JonathanWamsley May 17, 2022
b7a6c8a
move attributes to resource attributes
JonathanWamsley May 17, 2022
437930c
add flink integration files
JonathanWamsley May 17, 2022
e419845
update model import name
JonathanWamsley May 17, 2022
9243585
add changelog and tidy up
JonathanWamsley May 17, 2022
e88a92f
update mod and lint check
JonathanWamsley May 18, 2022
b1a5d9d
update with pr feedback
JonathanWamsley May 18, 2022
5d51a2b
update pr feedback with status header
JonathanWamsley May 18, 2022
3b96bbe
unexport process methods
JonathanWamsley May 18, 2022
059b852
go tidy up
JonathanWamsley May 18, 2022
2556c3a
add partial metrics collecting on taskmanager, jobs, and subtasks
JonathanWamsley May 18, 2022
e987ade
go tidy update
JonathanWamsley May 18, 2022
0809afa
fix shadow declaration of err
JonathanWamsley May 18, 2022
cf7044b
update pr feedback
JonathanWamsley May 19, 2022
13ce08f
tidy up
JonathanWamsley May 19, 2022
a19581e
apply scope version update
JonathanWamsley May 19, 2022
eeaa643
make expected responses easier to test when metadata/generated files …
JonathanWamsley May 19, 2022
c89fc4d
update to host.name and move status table
JonathanWamsley May 23, 2022
40c0db2
combine jobmanager and taskmanager metrics
JonathanWamsley May 24, 2022
84a0a61
tidy up
JonathanWamsley May 24, 2022
2c2b358
update generated files
JonathanWamsley May 24, 2022
c0c7436
fix mod version
JonathanWamsley May 24, 2022
4a7d836
update pr feedback
JonathanWamsley May 25, 2022
fc5a9b6
tidy up
JonathanWamsley May 25, 2022
d77c532
seperated checkpoint in_progress as non-monotonic sum metric
JonathanWamsley May 25, 2022
4c244c6
tidy up local receiver
JonathanWamsley May 25, 2022
52e5196
update version
JonathanWamsley May 25, 2022
53620aa
update cpu descriptions
JonathanWamsley May 26, 2022
34383e1
fix taskmanager/jobs bug and added tests with multiple taskmanagers/jobs
JonathanWamsley May 26, 2022
57f27c7
space
JonathanWamsley May 27, 2022
681ed51
change non_heap to nonheap
JonathanWamsley May 27, 2022
7e49410
update unit
JonathanWamsley May 27, 2022
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ receiver/dotnetdiagnosticsreceiver/ @open-telemetry/collector-c
receiver/elasticsearchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @binaryfissiongames
receiver/expvarreceiver/ @open-telemetry/collector-contrib-approvers @jamesmoessis @MovieStoreGuy
receiver/filelogreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski
receiver/flinkmetricsreceiver/ @open-telemetry/collector-contrib-approvers @jonathanwamsley @djaglowski
receiver/fluentforwardreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax
receiver/googlecloudpubsubreceiver/ @open-telemetry/collector-contrib-approvers @alexvanboxel
receiver/googlecloudspannerreceiver/ @open-telemetry/collector-contrib-approvers @ydrozhdzhal @asukhyy @khospodarysko @architjugran
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

- `jmxreceiver`: Remove properties & groovyscript parameters from JMX Receiver. Add ResourceAttributes & LogLevel parameter to supply some of the removed functionality with reduced attack surface (#9685)
- `resourcedetectionprocessor`: 'gke' and 'gce' resource detectors are replaced with a single 'gcp' detector (#10347)

- `pkg/stanza`: Removed reference to deprecated `ClusterName` (#10426)

### 🚩 Deprecations 🚩

### 🚀 New components 🚀

- `flinkmetricsreceiver`: Add implementation of Flink Metric Receiver (#10121)
- `windowseventlogreceiver` Added implementation of Windows Event Log Receiver (#9228)
- `vcenterreceiver`: Add metrics receiver for new vcenterreceiver component (#9224)

Expand Down
3 changes: 3 additions & 0 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dotnetdiagnosticsreceiver v0.52.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.52.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.52.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.0.0-00010101000000-000000000000 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.52.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.52.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.52.0 // indirect
Expand Down Expand Up @@ -761,6 +762,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elast

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver => ../../receiver/filelogreceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver => ../../receiver/flinkmetricsreceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver => ../../receiver/fluentforwardreceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver => ../../receiver/googlecloudpubsubreceiver
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dotnetdiagnosticsreceiver v0.52.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver v0.52.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.52.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.52.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.52.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.52.0
Expand Down Expand Up @@ -757,6 +758,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/colle

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver => ./receiver/couchdbreceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver => ./receiver/flinkmetricsreceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver => ./receiver/dockerstatsreceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dotnetdiagnosticsreceiver => ./receiver/dotnetdiagnosticsreceiver
Expand Down
2 changes: 2 additions & 0 deletions internal/components/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dotnetdiagnosticsreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver"
Expand Down Expand Up @@ -204,6 +205,7 @@ func Components() (component.Factories, error) {
dotnetdiagnosticsreceiver.NewFactory(),
elasticsearchreceiver.NewFactory(),
filelogreceiver.NewFactory(),
flinkmetricsreceiver.NewFactory(),
fluentforwardreceiver.NewFactory(),
googlecloudspannerreceiver.NewFactory(),
hostmetricsreceiver.NewFactory(),
Expand Down
3 changes: 3 additions & 0 deletions internal/components/receivers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ func TestDefaultReceivers(t *testing.T) {
return cfg
},
},
{
receiver: "flinkmetrics",
},
{
receiver: "fluentforward",
},
Expand Down
1 change: 1 addition & 0 deletions receiver/flinkmetricsreceiver/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../Makefile.Common
43 changes: 43 additions & 0 deletions receiver/flinkmetricsreceiver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# FlinkMetrics Receiver

| Status | |
| ------------------------ | --------- |
| Stability | [alpha] |
| Supported pipeline types | metrics |
| Distributions | [contrib] |

This receiver uses Flink's [REST API](https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/ops/metrics/#rest-api-integration) to collect Jobmanager, Taskmanager, Job, Task and Operator metrics.

## Prerequisites

This receiver supports Apache Flink versions `1.13.6` and `1.14.4`.

By default, authentication is not required. However, [Flink recommends](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/security/security-ssl/#external--rest-connectivity) using a “side car proxy” that Binds the REST endpoint to the loopback interface and to start a REST proxy that authenticates and forwards the request to Flink.

[SSL](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/security/security-ssl/#external--rest-connectivity) can be enabled with the following REST endpoint [options](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/security/security-ssl/#rest-endpoints-external-connectivity) for external connectivity and have a self signed certificate or be self signed.

## Configuration

The following settings are optional:

- `endpoint` (default: `http://localhost:15672`): The URL of the node to be monitored.
- `collection_interval` (default = `10s`): This receiver collects metrics on an interval. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `tls` (defaults defined [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md)): TLS control. By default insecure settings are rejected and certificate verification is on.

### Example Configuration

```yaml
receivers:
flinkmetrics:
endpoint: http://localhost:8081
collection_interval: 10s
```

The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). TLS config is documented further under the [opentelemetry collector's configtls package](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md).

## Metrics

Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml)

[alpha]: https://github.com/open-telemetry/opentelemetry-collector-contrib#alpha
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
Loading