Skip to content

Commit

Permalink
[extension/healthcheckv2] Add skeleton (#32523)
Browse files Browse the repository at this point in the history
This PR is an attempt to decompose
#30673
into more manageable pieces for review. It introduces the skeleton and
config for the new healthcheck extension. The extension itself is
implemented as multiple subcomponents. That is, the http and grpc
services implement the component interface individually, as does the
extension that ties them together. I mention this because this PR
introduces the config structs and this is relevant for understanding why
it is organized as it is. Additionally, the extension supports and
defaults to the config for the existing extension. This is so it can be
a drop in replacement for the existing extension with an easy migration
path to the new functionality and features introduced the v2 extension.
See the [parent
PR](#30673
) to understand how the pieces fit together.

**Link to tracking Issue:** #26661

**Testing:** Units / manual

**Documentation:** Readme, etc.
  • Loading branch information
mwear authored Apr 24, 2024
1 parent 9527fbc commit dbff637
Show file tree
Hide file tree
Showing 29 changed files with 1,432 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .chloggen/healthcheck-v2-skeleton.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'new_component'

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: healthcheckv2extension

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Introduce the skeleton for the temporary healthcheckv2 extension.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [26661]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ extension/encoding/zipkinencodingextension/ @open-telemetry/collect
extension/googleclientauthextension/ @open-telemetry/collector-contrib-approvers @dashpole @damemi @aabmass @jsuereth @punya @psx95
extension/headerssetterextension/ @open-telemetry/collector-contrib-approvers @jpkrohling
extension/healthcheckextension/ @open-telemetry/collector-contrib-approvers @jpkrohling
extension/healthcheckv2extension/ @open-telemetry/collector-contrib-approvers @jpkrohling @mwear
extension/httpforwarderextension/ @open-telemetry/collector-contrib-approvers @atoulme @rmfitzpatrick
extension/jaegerremotesampling/ @open-telemetry/collector-contrib-approvers @yurishkuro @frzifus
extension/oauth2clientauthextension/ @open-telemetry/collector-contrib-approvers @pavankrish123 @jpkrohling
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ body:
- extension/googleclientauth
- extension/headerssetter
- extension/healthcheck
- extension/healthcheckv2
- extension/httpforwarder
- extension/jaegerremotesampling
- extension/oauth2clientauth
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ body:
- extension/googleclientauth
- extension/headerssetter
- extension/healthcheck
- extension/healthcheckv2
- extension/httpforwarder
- extension/jaegerremotesampling
- extension/oauth2clientauth
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ body:
- extension/googleclientauth
- extension/headerssetter
- extension/healthcheck
- extension/healthcheckv2
- extension/httpforwarder
- extension/jaegerremotesampling
- extension/oauth2clientauth
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/unmaintained.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ body:
- extension/googleclientauth
- extension/headerssetter
- extension/healthcheck
- extension/healthcheckv2
- extension/httpforwarder
- extension/jaegerremotesampling
- extension/oauth2clientauth
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ extensions:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckv2extension v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.99.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.99.0
Expand Down Expand Up @@ -266,6 +267,7 @@ replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver => ../../receiver/couchdbreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor => ../../processor/resourcedetectionprocessor
- github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension => ../../extension/healthcheckextension
- github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckv2extension => ../../extension/healthcheckv2extension
- github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension => ../../extension/headerssetterextension
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter => ../../exporter/googlemanagedprometheusexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver => ../../receiver/aerospikereceiver
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcontribcol/components.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions cmd/otelcontribcol/extensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckv2extension"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension"
Expand Down Expand Up @@ -61,6 +62,14 @@ func TestDefaultExtensions(t *testing.T) {
return cfg
},
},
{
extension: "healthcheckv2",
getConfigFn: func() component.Config {
cfg := extFactories["healthcheckv2"].CreateDefaultConfig().(*healthcheckv2extension.Config)
cfg.Endpoint = endpoint
return cfg
},
},
{
extension: "pprof",
getConfigFn: func() component.Config {
Expand Down
3 changes: 3 additions & 0 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/extension/googleclientauthextension v0.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckv2extension v0.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension v0.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.99.0
Expand Down Expand Up @@ -833,6 +834,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/reso

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension => ../../extension/healthcheckextension

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckv2extension => ../../extension/healthcheckv2extension

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension => ../../extension/headerssetterextension

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter => ../../exporter/googlemanagedprometheusexporter
Expand Down
1 change: 1 addition & 0 deletions extension/healthcheckv2extension/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../Makefile.Common
Loading

0 comments on commit dbff637

Please sign in to comment.