-
Notifications
You must be signed in to change notification settings - Fork 88
feat(orchestrator): Logging for Workflows #1803
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
lholmquist
merged 52 commits into
redhat-developer:main
from
lholmquist:rhdh-plugins-logging-for-workflows-RHIDP-9373
Jan 16, 2026
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
03cc0d6
squash: starting
lholmquist 2052ffa
squash: more things
lholmquist d964d88
squash: sort of works?
lholmquist 179a77a
squash: working but needs tests and cleanup
lholmquist 2ecef35
squash: making things prettier
lholmquist 928831d
squash: api generate
lholmquist 399d178
squash: api docs
lholmquist 6820ac5
squash: syncing
lholmquist 81fc68c
squash: .
lholmquist a96ed2c
squash: trying this out
lholmquist f2deb60
squash: updating the yan.lock
lholmquist 3bbed50
squash: starting testing - LokiProvider
lholmquist 2033a5e
squash: starting testing - LokiProvider
lholmquist 1f324e0
squash: remove unneeded file
lholmquist 7af1c22
squash: update yarn lock after rebase
lholmquist 2182500
squash: adding return value in reduce should help?
lholmquist cddd72e
squash: use a flatmap instead?
lholmquist 9ecf297
squash: using flatmap
lholmquist 0f441fb
squash: add use of custom selectors in the appconfig
lholmquist 8f76056
squash: cleanup
lholmquist dfd8270
squash: update readme for loki provider
lholmquist a3c45f4
squash: add config definition to the loki module
lholmquist 4e2c8b5
squash: app-config update
lholmquist d4be6ca
squash: .
lholmquist 54650a1
squash: some cleanup and code dedupe and better error handles
lholmquist 7048c5e
squash: .
lholmquist bced3b0
squash: fix code style
lholmquist e36cf0a
squash: adding a changeset
lholmquist f861b26
squash: update reports
lholmquist d4cb987
squash: .
lholmquist b8a33e9
squash: .
lholmquist 36b1def
squash: adding tests
lholmquist 6d2f291
squash: more tests
lholmquist 83039d3
squash: fixing tests
lholmquist 11c8fee
squash: fixes
lholmquist 495ecd2
squash: tests
lholmquist 75b5fd0
squash: update yarn.lock after the rebase
lholmquist 2e34cee
squash: fix tsc errors
lholmquist f4e3325
squash: fixing resolutions
lholmquist d8aa1e2
squash: fix issue with starting when we just want the defaults
lholmquist f4e101c
squash: fix tsc error
lholmquist 5da89ed
squash: Update workspaces/orchestrator/plugins/orchestrator-backend-m…
lholmquist 2d64353
squash: Update workspaces/orchestrator/plugins/orchestrator-backend-m…
lholmquist beeb16c
squash: spelling changes
lholmquist b00be99
squash: Update workspaces/orchestrator/plugins/orchestrator-backend/s…
lholmquist 064509e
squash: Update workspaces/orchestrator/plugins/orchestrator-backend-m…
lholmquist 0b97611
squash: Update workspaces/orchestrator/plugins/orchestrator-backend-m…
lholmquist 189201d
squash: Update workspaces/orchestrator/plugins/orchestrator-backend-m…
lholmquist 5e3be73
squash: Update workspaces/orchestrator/plugins/orchestrator-backend-m…
lholmquist 5ea5140
squash: Update workspaces/orchestrator/packages/backend/src/index.ts
lholmquist 3e83f9e
squash: updating yarn.lock after dep updates
lholmquist 28c976f
squash: regenerate report
lholmquist 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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 |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| sonar.cpd.exclusions=workspaces/*/packages/app/**, workspaces/*/packages/backend/**, workspaces/*/plugins/*test*/**, **/*.test.*, **/translations/*.ts, **/__fixtures__/*, **/playwright.config.ts | ||
| sonar.exclusions=workspaces/*/plugins/orchestrator-common/src/generated/** | ||
|
|
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,9 @@ | ||
| --- | ||
| '@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki': major | ||
| '@red-hat-developer-hub/backstage-plugin-orchestrator-backend': minor | ||
| '@red-hat-developer-hub/backstage-plugin-orchestrator-common': minor | ||
| '@red-hat-developer-hub/backstage-plugin-orchestrator-node': major | ||
| '@red-hat-developer-hub/backstage-plugin-orchestrator': minor | ||
| --- | ||
|
|
||
| Adding Workflow Logs endpoint. Loki provider added |
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
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
16 changes: 16 additions & 0 deletions
16
workspaces/orchestrator/plugins/orchestrator-backend-module-loki/.eslintrc.js
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,16 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); |
60 changes: 60 additions & 0 deletions
60
workspaces/orchestrator/plugins/orchestrator-backend-module-loki/README.md
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,60 @@ | ||
| # Orchestrator Backend Module for Loki | ||
|
|
||
| This is an extension module to the `backstage-plugin-orchestrator-backend` plugin. It provides access to the Loki log provider | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before installing this module, ensure that the Orchestrator backend plugin is integrated into your Backstage instance. Follow the [Orchestrator README](https://github.com/redhat-developer/rhdh-plugins/tree/main/workspaces/orchestrator) for setup instructions. | ||
|
|
||
| This module also requires a Loki `workflowLogProvider` integration to be configured in your `app-config.yaml`. This will be added to the `orchestrator` section and might look something like this: | ||
|
|
||
| ``` | ||
| orchestrator: | ||
| workflowLogProvider: | ||
| loki: | ||
| baseUrl: http://localhost:3100 | ||
| # logStreamSelectors: | ||
| # - label: 'app' | ||
| # value: '=~".+"' | ||
| ``` | ||
|
|
||
| The `baseUrl` is required. | ||
|
|
||
| Multiple Log Stream Selectors can be specified in the `logStreamSelectors` section. See the loki docs to learn more about log stream selectors and their values: https://grafana.com/docs/loki/latest/query/log_queries/#log-stream-selector | ||
|
|
||
| ## Installation | ||
|
|
||
| To install this backend module: | ||
|
|
||
| ```bash | ||
| # From your root directory | ||
| yarn workspace backend add @red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki | ||
| ``` | ||
|
|
||
| ```ts | ||
| // packages/backend/src/index.ts | ||
| import { createBackend } from '@backstage/backend-defaults'; | ||
|
|
||
| const backend = createBackend(); | ||
|
|
||
| // orchestrator | ||
| backend.add( | ||
| import('@red-hat-developer-hub/backstage-plugin-orchestrator-backend'), | ||
| ); | ||
| // orchestrator Log Provider | ||
| backend.add( | ||
| import( | ||
| '@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki' | ||
| ), | ||
| ); | ||
|
|
||
| backend.start(); | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| Once the module is successfully setup, a user can view an orchestrator workflows log. This can be accessed by the new backend endpoint here: RHDH_BACK_END_URL/api/orchestrator/v2/workflows/instances/WORKFLOW_INSTANCE_ID/logs | ||
|
|
||
| Or by clicking the "view log" link on the orchestrator front-end: | ||
|
|
||
|  |
74 changes: 74 additions & 0 deletions
74
...es/orchestrator/plugins/orchestrator-backend-module-loki/__fixtures__/mockWorkflowLogs.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,74 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| const mockWorkflowLog = { | ||
| status: 'success', | ||
| data: { | ||
| resultType: 'streams', | ||
| result: [ | ||
| { | ||
| stream: { | ||
| detected_level: 'error', | ||
| service_name: 'unknown_service', | ||
| }, | ||
| values: [ | ||
| [ | ||
| '1764952546330041000', | ||
| '2025-12-05 16:35:14,644 9eb78e04f727 ERROR [org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl:1316] (executor-thread-14) Unexpected error while executing node createNotification in process instance 7a6d2622-a315-4737-9278-36311ba4583a: org.jbpm.workflow.instance.WorkflowRuntimeException: [sendnotification:7a6d2622-a315-4737-9278-36311ba4583a - createNotification:[uuid=7]] -- RESTEASY004655: Unable to invoke request: org.apache.http.client.ClientProtocolException', | ||
| ], | ||
| ], | ||
| }, | ||
| { | ||
| stream: { | ||
| detected_level: 'info', | ||
| service_name: 'unknown_service', | ||
| }, | ||
| values: [ | ||
| [ | ||
| '1764952546332968000', | ||
| "2025-12-05 16:35:14,668 9eb78e04f727 INFO [org.kie.kogito.serverless.workflow.devservices.DevModeServerlessWorkflowLogger:50] (executor-thread-14) Workflow 'sendnotification' (7a6d2622-a315-4737-9278-36311ba4583a) was started, now 'Error'", | ||
| ], | ||
| [ | ||
| '1764952546327277000', | ||
| '2025-12-05 16:35:14,626 9eb78e04f727 INFO [org.kie.kogito.process.workitems.impl.DefaultKogitoWorkItemHandler:105] (executor-thread-14) error workItem WorkItem 7ee1509a-03b4-47e2-891f-31f6d225e520 [name=notifications_createNotification, state=1, processInstanceId=7a6d2622-a315-4737-9278-36311ba4583a, parameters{Parameter={"recipients":["user:development/guest"],"title":"This is a notification","topic":"Manually sent"}, payload={severity=normal, link=https://www.redhat.com, description=Description of the notification, topic=Manually sent, title=This is a notification}, recipients={entityRef=[user:development/guest], type=entity}}] handled by notifications_createNotification transition DefaultWorkItemTransitionImpl [id=activate, data={}, policies=[], termination=null] : jakarta.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: org.apache.http.client.ClientProtocolException', | ||
| ], | ||
| [ | ||
| '1764952546327248000', | ||
| "2025-12-05 16:35:13,632 9eb78e04f727 INFO [org.kie.kogito.serverless.workflow.devservices.DevModeServerlessWorkflowLogger:64] (executor-thread-14) Triggered node 'createNotification' for process 'sendnotification' (7a6d2622-a315-4737-9278-36311ba4583a)", | ||
| ], | ||
| [ | ||
| '1764952546327240000', | ||
| "2025-12-05 16:35:13,628 9eb78e04f727 INFO [org.kie.kogito.serverless.workflow.devservices.DevModeServerlessWorkflowLogger:64] (executor-thread-14) Triggered node 'SendNotification' for process 'sendnotification' (7a6d2622-a315-4737-9278-36311ba4583a)", | ||
| ], | ||
| [ | ||
| '1764952546327187000', | ||
| "2025-12-05 16:35:13,623 9eb78e04f727 INFO [org.kie.kogito.serverless.workflow.devservices.DevModeServerlessWorkflowLogger:64] (executor-thread-14) Triggered node 'Prepare' for process 'sendnotification' (7a6d2622-a315-4737-9278-36311ba4583a)", | ||
| ], | ||
| [ | ||
| '1764952546327177000', | ||
| "2025-12-05 16:35:13,622 9eb78e04f727 INFO [org.kie.kogito.serverless.workflow.devservices.DevModeServerlessWorkflowLogger:64] (executor-thread-14) Triggered node 'Start' for process 'sendnotification' (7a6d2622-a315-4737-9278-36311ba4583a)", | ||
| ], | ||
| [ | ||
| '1764952546327102000', | ||
| "2025-12-05 16:35:13,618 9eb78e04f727 INFO [org.kie.kogito.serverless.workflow.devservices.DevModeServerlessWorkflowLogger:40] (executor-thread-14) Starting workflow 'sendnotification' (7a6d2622-a315-4737-9278-36311ba4583a)", | ||
| ], | ||
| ], | ||
| }, | ||
| ], | ||
| }, | ||
| }; | ||
|
|
||
| export default mockWorkflowLog; |
37 changes: 37 additions & 0 deletions
37
workspaces/orchestrator/plugins/orchestrator-backend-module-loki/config.d.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,37 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| export interface Config { | ||
| /** | ||
| * Configuration for the Orchestrator plugin. | ||
| */ | ||
| orchestrator?: { | ||
| workflowLogProvider?: { | ||
| loki?: { | ||
| /** | ||
| * Base URL of the Loki service. | ||
| */ | ||
| baseUrl: string; | ||
| logStreamSelectors?: Array<{ | ||
| // label is the selector, something like 'app' or 'service_name', etc... | ||
| label: string; | ||
| // value is the label matching operator, so something like: '=~".+"' | ||
| value: string; | ||
| }>; | ||
| }; | ||
| }; | ||
| }; | ||
| } |
Binary file added
BIN
+61.5 KB
.../orchestrator/plugins/orchestrator-backend-module-loki/img/view-logs-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+419 KB
...paces/orchestrator/plugins/orchestrator-backend-module-loki/img/viewing-log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions
66
workspaces/orchestrator/plugins/orchestrator-backend-module-loki/package.json
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,66 @@ | ||
| { | ||
| "name": "@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki", | ||
| "version": "0.1.0", | ||
| "license": "Apache-2.0", | ||
| "description": "The loki backend module for the orchestrator plugin.", | ||
| "main": "src/index.ts", | ||
| "types": "src/index.ts", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "backstage": { | ||
| "role": "backend-plugin-module", | ||
| "pluginId": "orchestrator", | ||
| "pluginPackage": "@red-hat-developer-hub/backstage-plugin-orchestrator-backend" | ||
| }, | ||
| "exports": { | ||
| ".": "./src/index.ts", | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "typesVersions": { | ||
| "*": { | ||
| "package.json": [ | ||
| "package.json" | ||
| ] | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "start": "backstage-cli package start", | ||
| "build": "backstage-cli package build", | ||
| "lint": "backstage-cli package lint", | ||
| "test": "backstage-cli package test", | ||
| "clean": "backstage-cli package clean", | ||
| "prepack": "backstage-cli package prepack", | ||
| "postpack": "backstage-cli package postpack", | ||
| "tsc": "tsc", | ||
| "prettier:check": "prettier --ignore-unknown --check .", | ||
| "prettier:fix": "prettier --ignore-unknown --write ." | ||
| }, | ||
| "dependencies": { | ||
| "@backstage/backend-plugin-api": "^1.5.0", | ||
| "@red-hat-developer-hub/backstage-plugin-orchestrator-common": "workspace:^", | ||
| "@red-hat-developer-hub/backstage-plugin-orchestrator-node": "workspace:^", | ||
| "luxon": "^3.7.2" | ||
| }, | ||
| "devDependencies": { | ||
| "@backstage/backend-test-utils": "^1.10.0", | ||
| "@backstage/cli": "^0.34.5", | ||
| "@backstage/config": "^1.3.6" | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
| "config.d.ts" | ||
| ], | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/redhat-developer/rhdh-plugins", | ||
| "directory": "workspaces/orchestrator/plugins/orchestrator-backend-module-loki" | ||
| }, | ||
| "keywords": [ | ||
| "backstage", | ||
| "plugin" | ||
| ], | ||
| "homepage": "https://red.ht/rhdh", | ||
| "bugs": "https://github.com/redhat-developer/rhdh-plugins/issues", | ||
| "author": "Red Hat" | ||
| } |
13 changes: 13 additions & 0 deletions
13
workspaces/orchestrator/plugins/orchestrator-backend-module-loki/report.api.md
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,13 @@ | ||
| ## API Report File for "@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki" | ||
|
|
||
| > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
|
|
||
| ```ts | ||
|
|
||
| import { BackendFeature } from '@backstage/backend-plugin-api'; | ||
|
|
||
| // @public | ||
| const orchestratorModuleLoki: BackendFeature; | ||
| export default orchestratorModuleLoki; | ||
|
|
||
| ``` |
23 changes: 23 additions & 0 deletions
23
workspaces/orchestrator/plugins/orchestrator-backend-module-loki/src/index.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,23 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| /** | ||
| * The loki backend module for the orchestrator plugin. | ||
| * | ||
| * @packageDocumentation | ||
| */ | ||
|
|
||
| export { orchestratorModuleLoki as default } from './module'; |
44 changes: 44 additions & 0 deletions
44
workspaces/orchestrator/plugins/orchestrator-backend-module-loki/src/module.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,44 @@ | ||
| /* | ||
| * Copyright Red Hat, Inc. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| import { | ||
| coreServices, | ||
| createBackendModule, | ||
| } from '@backstage/backend-plugin-api'; | ||
| import { workflowLogsExtensionEndpoint } from '@red-hat-developer-hub/backstage-plugin-orchestrator-node'; | ||
| import { LokiProvider } from './workflowLogsProviders/LokiProvider'; | ||
| /** | ||
|
|
||
| * Provides access to the Loki log provider for viewing Orchestrator workflow logs | ||
| * | ||
| * @public | ||
| */ | ||
| export const orchestratorModuleLoki = createBackendModule({ | ||
| pluginId: 'orchestrator', | ||
| moduleId: 'loki', | ||
| register(reg) { | ||
| reg.registerInit({ | ||
| deps: { | ||
| config: coreServices.rootConfig, | ||
| logger: coreServices.logger, | ||
| workflowLogs: workflowLogsExtensionEndpoint, | ||
| }, | ||
| async init({ config, logger, workflowLogs }) { | ||
| logger.info('Initialize the Loki orchestrator backend module'); | ||
| workflowLogs.addWorkflowLogProvider(LokiProvider.fromConfig(config)); | ||
| }, | ||
| }); | ||
| }, | ||
| }); | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.