-
Notifications
You must be signed in to change notification settings - Fork 16
EAP7-2055 Add Support for OpenTelemetry in the console #138
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
184 changes: 184 additions & 0 deletions
184
...ages/testsuite/cypress/e2e/opentelemetry/test-configuration-subsystem-opentelemetry.cy.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,184 @@ | ||
| describe("TESTS: Configuration => Subsystem => OpenTelemetry", () => { | ||
| const address = ["subsystem", "opentelemetry"]; | ||
| const configurationFormId = "model-browser-model-browser-root-form"; | ||
|
|
||
| // Attribute names | ||
| const serviceName = "service-name"; | ||
| const endpoint = "endpoint"; | ||
| const exporterType = "exporter-type"; | ||
| const spanProcessorType = "span-processor-type"; | ||
| const batchDelay = "batch-delay"; | ||
| const maxQueueSize = "max-queue-size"; | ||
| const maxExportBatchSize = "max-export-batch-size"; | ||
| const exportTimeout = "export-timeout"; | ||
| const samplerType = "sampler-type"; | ||
| const ratio = "ratio"; | ||
|
|
||
| let managementEndpoint: string; | ||
|
|
||
| before(() => { | ||
| cy.startWildflyContainer({ configuration: "standalone-microprofile-insecure.xml" }).then((result) => { | ||
| managementEndpoint = result as string; | ||
| }); | ||
| }); | ||
|
|
||
| after(() => { | ||
| cy.task("stop:containers"); | ||
| }); | ||
|
|
||
| it("Edit service-name", () => { | ||
| const customServiceName = "my-otel-service"; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, serviceName, customServiceName); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, serviceName, customServiceName); | ||
| }); | ||
|
|
||
| it("Edit endpoint", () => { | ||
| const customEndpoint = "http://otel-collector:4317"; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, endpoint, customEndpoint); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, endpoint, customEndpoint); | ||
| }); | ||
|
|
||
| it("Edit endpoint with expression", () => { | ||
| const expressionValue = "${env.OTEL_ENDPOINT:http://localhost:4317}"; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.textExpression(configurationFormId, endpoint, expressionValue); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttributeAsExpression(managementEndpoint, address, endpoint, expressionValue); | ||
| }); | ||
|
|
||
| it("Change exporter-type to jaeger", () => { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.selectInDropdownMenu(configurationFormId, exporterType, "jaeger"); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, exporterType, "jaeger"); | ||
| }); | ||
|
|
||
| it("Change exporter-type to otlp", () => { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.selectInDropdownMenu(configurationFormId, exporterType, "otlp"); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, exporterType, "otlp"); | ||
| }); | ||
|
|
||
| it("Change span-processor-type to simple", () => { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.selectInDropdownMenu(configurationFormId, spanProcessorType, "simple"); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, spanProcessorType, "simple"); | ||
| }); | ||
|
|
||
| it("Change span-processor-type to batch", () => { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.selectInDropdownMenu(configurationFormId, spanProcessorType, "batch"); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, spanProcessorType, "batch"); | ||
| }); | ||
|
|
||
| it("Edit batch-delay", () => { | ||
| const customBatchDelay = 10000; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, batchDelay, customBatchDelay); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, batchDelay, customBatchDelay); | ||
| }); | ||
|
|
||
| it("Edit max-queue-size", () => { | ||
| const customMaxQueueSize = 4096; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, maxQueueSize, customMaxQueueSize); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, maxQueueSize, customMaxQueueSize); | ||
| }); | ||
|
|
||
| it("Edit max-export-batch-size", () => { | ||
| const customMaxExportBatchSize = 1024; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, maxExportBatchSize, customMaxExportBatchSize); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, maxExportBatchSize, customMaxExportBatchSize); | ||
| }); | ||
|
|
||
| it("Edit export-timeout", () => { | ||
| const customExportTimeout = 60000; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.text(configurationFormId, exportTimeout, customExportTimeout); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, exportTimeout, customExportTimeout); | ||
| }); | ||
|
|
||
| it("Change sampler-type to on", () => { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.selectInDropdownMenu(configurationFormId, samplerType, "on"); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, samplerType, "on"); | ||
| }); | ||
|
|
||
| it("Change sampler-type to off", () => { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.selectInDropdownMenu(configurationFormId, samplerType, "off"); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, samplerType, "off"); | ||
| }); | ||
|
|
||
| it("Change sampler-type to ratio and set ratio value", () => { | ||
| const ratioValue = 0.5; | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.editForm(configurationFormId); | ||
| cy.selectInDropdownMenu(configurationFormId, samplerType, "ratio"); | ||
| cy.text(configurationFormId, ratio, ratioValue); | ||
| cy.saveForm(configurationFormId); | ||
| cy.verifySuccess(); | ||
| cy.verifyAttribute(managementEndpoint, address, samplerType, "ratio"); | ||
| cy.verifyAttribute(managementEndpoint, address, ratio, ratioValue); | ||
| }); | ||
|
|
||
| it("Reset configuration", () => { | ||
| cy.navigateToGenericSubsystemPage(managementEndpoint, address); | ||
| cy.get('#model-browser-resource-tab-container a[href="#model-browser-resource-data-tab"]').click(); | ||
| cy.resetForm(configurationFormId, managementEndpoint, address); | ||
| }); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think this should be moved to microprofile tests.
Uh oh!
There was an error while loading. Please reload this page.
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 think this is good idea. I am follow the subsystems organization as in web console. There is no section for microprofile subsystems. All subsystems are on the same level.
Maybe you had on mind
Microprofile telemetrysubsystem to have in the microprofile tests. this make more sens to me. but still i would keep to keep the same organization level as in the web console. so even for thisMicroprofile telemetrysubsystem i would like to create a new folder for its tests.