-
Notifications
You must be signed in to change notification settings - Fork 14
Add to OTel reporting for feature parity #5549
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
base: otel-pg-poc-metrics-test
Are you sure you want to change the base?
Conversation
|
|
| self.collector_config_file = "./utils/build/docker/otelcol-config-with-postgres.yaml" | ||
| self.collector_container = OpenTelemetryCollectorContainer( | ||
| config_file="./utils/build/docker/otelcol-config-with-postgres.yaml", | ||
| config_file=self.collector_config_file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll dispatch this info in two places, can you rather rename OpenTelemetryCollectorContainer._otel_config_host_path to OpenTelemetryCollectorContainer.config_file, and use in this class self.collector_container,config_file ?
| result["configuration"]["pipelines"] = list(otel_config["service"]["pipelines"].keys()) | ||
|
|
||
| except Exception as e: | ||
| logger.warning(f"Failed to parse OTel collector config: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be an error :
| logger.warning(f"Failed to parse OTel collector config: {e}") | |
| pytest.exit(f"Failed to parse OTel collector config: {e}", 1) |
| logger.warning(f"Failed to parse OTel collector config: {e}") | ||
|
|
||
| # Add PostgreSQL database version dynamically from container | ||
| if hasattr(self, "postgres_container") and self.postgres_container: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OtelCollectorScenario always has a postgres_container.
| # Add PostgreSQL database version dynamically from container | ||
| if hasattr(self, "postgres_container") and self.postgres_container: | ||
| postgres_version = "unknown" | ||
| if hasattr(self.postgres_container, "image") and self.postgres_container.image: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this one, TestedContainer has always an image
| if hasattr(self.postgres_container, "image") and self.postgres_container.image: | ||
| # Extract version from image name | ||
| image_name = self.postgres_container.image.name | ||
| postgres_version = image_name.split(":")[-1].split("-")[0] if ":" in image_name else "alpine" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels very fragile, there must be a way to get this version in a cleaner way
| def customize_feature_parity_dashboard(self, result: dict) -> None: | ||
| result["configuration"]["collector_version"] = str(self.library.version) | ||
|
|
||
| if hasattr(self.collector_container, "image") and self.collector_container.image: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The is always an image here, no ?
Motivation
Changes
How to test:
Run the scenario:
./run.sh OTEL_COLLECTORSee feature parity output:
cat logs_otel_collector/feature_parity.jsonExpected:
Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>], double-check that only<language>is impacted by the changebuild-XXX-imagelabel is present