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
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def _derive_stability(stability: dict[str, list[str]] | None) -> str | None:
return best


def _make_component_id(distribution: str, component_type: str, name: str) -> str:
return f"{distribution}-{component_type}-{name}"
def _make_component_id(distribution: str, name: str) -> str:
return f"{distribution}-{name}"


def transform_collector_components(
Expand Down Expand Up @@ -78,7 +78,7 @@ def transform_collector_components(
status: dict[str, Any] = metadata.get("status") or {}

component: dict[str, Any] = {
"id": _make_component_id(distribution, component_type, name),
"id": _make_component_id(distribution, name),
"ecosystem": "collector",
"distribution": distribution,
"type": component_type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def db_writer(temp_db_dir):
def sample_components():
return [
{
"id": "contrib-receiver-otlp",
"id": "contrib-otlp",
"ecosystem": "collector",
"distribution": "contrib",
"type": "receiver",
Expand All @@ -47,7 +47,7 @@ def sample_components():
"status": {"class": "receiver", "stability": {"beta": ["traces"]}},
},
{
"id": "core-processor-batch",
"id": "core-batch",
"ecosystem": "collector",
"distribution": "core",
"type": "processor",
Expand All @@ -65,9 +65,9 @@ def test_write_components_success(self, db_writer, sample_components, temp_db_di
component_map = db_writer.write_components(sample_components)

assert len(component_map) == 2
assert "contrib-receiver-otlp" in component_map
assert "core-processor-batch" in component_map
assert len(component_map["contrib-receiver-otlp"]) == 12
assert "contrib-otlp" in component_map
assert "core-batch" in component_map
assert len(component_map["contrib-otlp"]) == 12

for comp_id, comp_hash in component_map.items():
expected = temp_db_dir / "components" / comp_id / f"{comp_id}-{comp_hash}.json"
Expand All @@ -76,7 +76,7 @@ def test_write_components_success(self, db_writer, sample_components, temp_db_di
def test_write_components_content(self, db_writer, sample_components, temp_db_dir):
component_map = db_writer.write_components(sample_components)

comp_id = "contrib-receiver-otlp"
comp_id = "contrib-otlp"
comp_hash = component_map[comp_id]
path = temp_db_dir / "components" / comp_id / f"{comp_id}-{comp_hash}.json"
with open(path) as f:
Expand Down Expand Up @@ -126,7 +126,7 @@ def test_write_components_all_invalid(self, db_writer):
class TestWriteVersionIndex:
def test_write_version_index_success(self, db_writer, temp_db_dir):
version = Version("0.150.0")
component_map = {"contrib-receiver-otlp": "abc123456789"}
component_map = {"contrib-otlp": "abc123456789"}

db_writer.write_version_index(version, component_map)

Expand Down Expand Up @@ -204,7 +204,7 @@ def test_write_index_lightweight_components(self, db_writer, sample_components,
index_components = data["components"]
assert len(index_components) == 2

otlp = next(c for c in index_components if c["id"] == "contrib-receiver-otlp")
otlp = next(c for c in index_components if c["id"] == "contrib-otlp")
assert otlp["display_name"] == "OTLP Receiver"
assert otlp["stability"] == "beta"
# heavy fields absent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_basic_receiver(self):

assert len(result) == 1
component = result[0]
assert component["id"] == "contrib-receiver-otlpreceiver"
assert component["id"] == "contrib-otlpreceiver"
assert component["ecosystem"] == "collector"
assert component["distribution"] == "contrib"
assert component["type"] == "receiver"
Expand Down Expand Up @@ -150,7 +150,7 @@ def test_id_format(self):

result = transform_collector_components(inventory, "core")

assert result[0]["id"] == "core-receiver-nopreceiver"
assert result[0]["id"] == "core-nopreceiver"

def test_skips_non_dict_components(self, caplog):
inventory = _make_inventory(
Expand Down Expand Up @@ -210,7 +210,7 @@ def test_multiple_components_per_type(self):

assert len(result) == 2
ids = {c["id"] for c in result}
assert ids == {"contrib-receiver-receiver_a", "contrib-receiver-receiver_b"}
assert ids == {"contrib-receiver_a", "contrib-receiver_b"}

def test_repository_from_inventory(self):
inventory = _make_inventory(
Expand All @@ -232,7 +232,7 @@ def test_repository_from_inventory(self):
class TestMakeIndexComponent:
def test_extracts_lightweight_fields(self):
component = {
"id": "contrib-receiver-otlp",
"id": "contrib-otlp",
"ecosystem": "collector",
"distribution": "contrib",
"type": "receiver",
Expand All @@ -249,7 +249,7 @@ def test_extracts_lightweight_fields(self):

result = make_index_component(component)

assert result["id"] == "contrib-receiver-otlp"
assert result["id"] == "contrib-otlp"
assert result["name"] == "otlpreceiver"
assert result["distribution"] == "contrib"
assert result["type"] == "receiver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "ACK Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-ackextension",
"id": "contrib-ackextension",
"name": "ackextension",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"display_name": "Active Directory Domain Services Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-activedirectorydsreceiver",
"id": "contrib-activedirectorydsreceiver",
"metrics": {
"active_directory.ds.bind.rate": {
"attributes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"display_name": "Aerospike Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-aerospikereceiver",
"id": "contrib-aerospikereceiver",
"metrics": {
"aerospike.namespace.disk.available": {
"description": "Minimum percentage of contiguous disk space free to the namespace across all devices",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "Alertmanager Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-alertmanagerexporter",
"id": "contrib-alertmanagerexporter",
"name": "alertmanagerexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AlibabaCloud LogService Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-alibabacloudlogserviceexporter",
"id": "contrib-alibabacloudlogserviceexporter",
"name": "alibabacloudlogserviceexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"display_name": "Apache Web Server Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-apachereceiver",
"id": "contrib-apachereceiver",
"metrics": {
"apache.connections.async": {
"attributes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"display_name": "Apache Spark Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-apachesparkreceiver",
"id": "contrib-apachesparkreceiver",
"metrics": {
"spark.driver.block_manager.disk.usage": {
"attributes": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "ASAP Client Authentication Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-asapauthextension",
"id": "contrib-asapauthextension",
"name": "asapauthextension",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "Attributes Processor",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-processor-attributesprocessor",
"id": "contrib-attributesprocessor",
"name": "attributesprocessor",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AVRO Log Encoding Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-avrologencodingextension",
"id": "contrib-avrologencodingextension",
"name": "avrologencodingextension",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS CloudWatch Logs Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-awscloudwatchlogsexporter",
"id": "contrib-awscloudwatchlogsexporter",
"name": "awscloudwatchlogsexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS CloudWatch Metric Streams Encoding Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-awscloudwatchmetricstreamsencodingextension",
"id": "contrib-awscloudwatchmetricstreamsencodingextension",
"name": "awscloudwatchmetricstreamsencodingextension",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS CloudWatch Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-awscloudwatchreceiver",
"id": "contrib-awscloudwatchreceiver",
"name": "awscloudwatchreceiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS Container Insights Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-awscontainerinsightreceiver",
"id": "contrib-awscontainerinsightreceiver",
"name": "awscontainerinsightreceiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS ECS Container Metrics Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-awsecscontainermetricsreceiver",
"id": "contrib-awsecscontainermetricsreceiver",
"name": "awsecscontainermetricsreceiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS CloudWatch EMF Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-awsemfexporter",
"id": "contrib-awsemfexporter",
"name": "awsemfexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS Kinesis Data Firehose Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-awsfirehosereceiver",
"id": "contrib-awsfirehosereceiver",
"name": "awsfirehosereceiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS Kinesis Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-awskinesisexporter",
"id": "contrib-awskinesisexporter",
"name": "awskinesisexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS Lambda Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-awslambdareceiver",
"id": "contrib-awslambdareceiver",
"name": "awslambdareceiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS Logs Encoding Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-awslogsencodingextension",
"id": "contrib-awslogsencodingextension",
"name": "awslogsencodingextension",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS Proxy Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-awsproxy",
"id": "contrib-awsproxy",
"name": "awsproxy",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS S3 Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-awss3exporter",
"id": "contrib-awss3exporter",
"name": "awss3exporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS S3 Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-awss3receiver",
"id": "contrib-awss3receiver",
"name": "awss3receiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS X-Ray Tracing Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-awsxrayexporter",
"id": "contrib-awsxrayexporter",
"name": "awsxrayexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "AWS X-Ray Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-awsxrayreceiver",
"id": "contrib-awsxrayreceiver",
"name": "awsxrayreceiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "Azure Authenticator Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-azureauthextension",
"id": "contrib-azureauthextension",
"name": "azureauthextension",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "Azure Blob Storage Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-azureblobexporter",
"id": "contrib-azureblobexporter",
"name": "azureblobexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "Azure Blob Receiver",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-receiver-azureblobreceiver",
"id": "contrib-azureblobreceiver",
"name": "azureblobreceiver",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "Azure Data Explorer Exporter",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-exporter-azuredataexplorerexporter",
"id": "contrib-azuredataexplorerexporter",
"name": "azuredataexplorerexporter",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"display_name": "Azure Logs/Traces/Metrics Encoding Extension",
"distribution": "contrib",
"ecosystem": "collector",
"id": "contrib-extension-azureencodingextension",
"id": "contrib-azureencodingextension",
"name": "azureencodingextension",
"repository": "opentelemetry-collector-contrib",
"status": {
Expand Down
Loading