Skip to content
Open
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 .chloggen/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ components:
- receiver/active_directory_ds
- receiver/aerospike
- receiver/apache
- receiver/apachespark
- receiver/apache_spark
- receiver/awscloudwatch
- receiver/awscontainerinsightreceiver
- receiver/awsecscontainermetrics
Expand Down
13 changes: 13 additions & 0 deletions .chloggen/rename-apache-spark-receiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Use this changelog template to create an entry for release notes.

change_type: deprecation

component: receiver/apache_spark

note: Rename `apachespark` receiver to `apache_spark` with deprecated alias `apachespark`

issues: [45339]

subtext:

change_logs: [user]
5 changes: 4 additions & 1 deletion receiver/apachesparkreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ This receiver supports Apache Spark versions:

## Configuration

> **Note:** This receiver was renamed from `apachespark` to `apache_spark` to match the snake_case naming convention.
> The deprecated component type `apachespark` is still accepted as an alias and will log a deprecation warning.

These configuration options are for connecting to an Apache Spark application.

The following settings are optional:
Expand All @@ -43,7 +46,7 @@ The following settings are optional:

```yaml
receivers:
apachespark:
apache_spark:
collection_interval: 60s
endpoint: http://localhost:4040
application_names:
Expand Down
2 changes: 1 addition & 1 deletion receiver/apachesparkreceiver/documentation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[comment]: <> (Code generated by mdatagen. DO NOT EDIT.)

# apachespark
# apache_spark

## Default Metrics

Expand Down
7 changes: 5 additions & 2 deletions receiver/apachesparkreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/xreceiver"
"go.opentelemetry.io/collector/scraper"
"go.opentelemetry.io/collector/scraper/scraperhelper"

Expand All @@ -21,10 +22,12 @@ var errConfigNotSpark = errors.New("config was not a Spark receiver config")

// NewFactory creates a new receiver factory for Spark
func NewFactory() receiver.Factory {
return receiver.NewFactory(
return xreceiver.NewFactory(
metadata.Type,
createDefaultConfig,
receiver.WithMetrics(createMetricsReceiver, metadata.MetricsStability))
xreceiver.WithMetrics(createMetricsReceiver, metadata.MetricsStability),
xreceiver.WithDeprecatedTypeAlias(metadata.DeprecatedType),
)
}

// createDefaultConfig creates a config for Spark with as many default values as possible
Expand Down
2 changes: 1 addition & 1 deletion receiver/apachesparkreceiver/generated_component_test.go

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

2 changes: 1 addition & 1 deletion receiver/apachesparkreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
go.opentelemetry.io/collector/pdata v1.56.1-0.20260415114935-307e3abdbae9
go.opentelemetry.io/collector/receiver v1.56.1-0.20260415114935-307e3abdbae9
go.opentelemetry.io/collector/receiver/receivertest v0.150.1-0.20260415114935-307e3abdbae9
go.opentelemetry.io/collector/receiver/xreceiver v0.150.1-0.20260415114935-307e3abdbae9
go.opentelemetry.io/collector/scraper v0.150.1-0.20260415114935-307e3abdbae9
go.opentelemetry.io/collector/scraper/scraperhelper v0.150.1-0.20260415114935-307e3abdbae9
go.uber.org/goleak v1.3.0
Expand Down Expand Up @@ -107,7 +108,6 @@ require (
go.opentelemetry.io/collector/pipeline v1.56.1-0.20260415114935-307e3abdbae9 // indirect
go.opentelemetry.io/collector/pipeline/xpipeline v0.150.1-0.20260415114935-307e3abdbae9 // indirect
go.opentelemetry.io/collector/receiver/receiverhelper v0.150.1-0.20260415114935-307e3abdbae9 // indirect
go.opentelemetry.io/collector/receiver/xreceiver v0.150.1-0.20260415114935-307e3abdbae9 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Code generated by mdatagen. DO NOT EDIT.
$defs:
metrics_config:
description: MetricsConfig provides config for apachespark metrics.
description: MetricsConfig provides config for apache_spark metrics.
type: object
properties:
spark.driver.block_manager.disk.usage:
Expand Down Expand Up @@ -776,7 +776,7 @@ $defs:
type: boolean
default: true
resource_attributes_config:
description: ResourceAttributesConfig provides config for apachespark resource attributes.
description: ResourceAttributesConfig provides config for apache_spark resource attributes.
type: object
properties:
spark.application.id:
Expand Down Expand Up @@ -882,7 +882,7 @@ $defs:
items:
$ref: go.opentelemetry.io/collector/filter.config
metrics_builder_config:
description: MetricsBuilderConfig is a configuration for apachespark metrics builder.
description: MetricsBuilderConfig is a configuration for apache_spark metrics builder.
type: object
properties:
metrics:
Expand Down

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

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

3 changes: 2 additions & 1 deletion receiver/apachesparkreceiver/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
display_name: Apache Spark Receiver
type: apachespark
type: apache_spark
deprecated_type: apachespark

description: |
The Apache Spark Receiver fetches metrics for an Apache Spark cluster through the Apache Spark REST API - specifically,
Expand Down
4 changes: 2 additions & 2 deletions receiver/apachesparkreceiver/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ./bin/otelcontribcol_darwin_arm64 --config ./receiver/apachesparkreceiver/testdata/config.yaml
receivers:
apachespark:
apache_spark:
collection_interval: 15s
exporters:
file:
Expand All @@ -9,5 +9,5 @@ exporters:
service:
pipelines:
metrics:
receivers: [apachespark]
receivers: [apache_spark]
exporters: [file]
2 changes: 1 addition & 1 deletion reports/distributions/contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ components:
- active_directory_ds
- aerospike
- apache
- apachespark
- apache_spark
- awscloudwatch
- awscontainerinsightreceiver
- awsecscontainermetrics
Expand Down
Loading