Skip to content
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

[DataUsage][Serverless] Fix auto ops URL path suffix #200192

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5ce1b98
url path suffix
ashokaditya Nov 14, 2024
1d84582
redundant
ashokaditya Nov 14, 2024
3b0bde9
[CI] Auto-commit changed files from 'make api-docs'
kibanamachine Nov 14, 2024
7b76372
fixed the appContext setup
YulNaumenko Nov 14, 2024
eacba27
fixed logs factory
YulNaumenko Nov 14, 2024
8a88b7b
fix types/params
ashokaditya Nov 14, 2024
d01c2bb
Merge branch 'main' into task/fix-data-usage-autoops-api-integration-…
ashokaditya Nov 14, 2024
8213f5a
[CI] Auto-commit changed files from 'make api-docs'
kibanamachine Nov 14, 2024
590e978
fix logger
ashokaditya Nov 14, 2024
23d06d1
fix tests
ashokaditya Nov 14, 2024
0c99b66
-
YulNaumenko Nov 14, 2024
6781f2f
fix text project id
neptunian Nov 15, 2024
8e22e4a
Merge branch 'main' into task/fix-data-usage-autoops-api-integration-…
neptunian Nov 15, 2024
c234a1b
fixed schema for AutoOps API request
YulNaumenko Nov 15, 2024
7e266b2
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine Nov 15, 2024
0373154
date format to be ISO
YulNaumenko Nov 15, 2024
d1e52db
-
YulNaumenko Nov 15, 2024
445f9d4
removed logs
YulNaumenko Nov 15, 2024
14aab01
fixed expected response
YulNaumenko Nov 15, 2024
5dc1143
fixed test
YulNaumenko Nov 15, 2024
5185ed6
cleanup
ashokaditya Nov 18, 2024
ed2e693
Merge branch 'main' into task/fix-data-usage-autoops-api-integration-…
ashokaditya Nov 18, 2024
f8e86b5
abort requests
ashokaditya Nov 18, 2024
e3c6aa7
add traceparent
ashokaditya Nov 18, 2024
c661d0d
add a traceparent
ashokaditya Nov 18, 2024
9cc5aa9
review changes
ashokaditya Nov 18, 2024
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
1 change: 1 addition & 0 deletions x-pack/plugins/data_usage/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class DataUsagePlugin
}
setup(coreSetup: CoreSetup, pluginsSetup: DataUsageSetupDependencies): DataUsageServerSetup {
this.logger.debug('data usage plugin setup');
this.dataUsageContext.cloud = pluginsSetup.cloud;
const dataUsageService = new DataUsageService(this.dataUsageContext);

pluginsSetup.features.registerElasticsearchFeature({
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/data_usage/server/services/autoops_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ export class AutoOpsAPIService {
and TLS ca: ${autoopsConfig?.api?.tls?.ca ? '[REDACTED]' : 'undefined'}`
);
const tlsConfig = this.createTlsConfig(autoopsConfig);
const cloudSetup = this.appContextService.getCloud();

const requestConfig: AxiosRequestConfig = {
url: autoopsConfig.api?.url,
url: `${autoopsConfig.api?.url}/monitoring/serverless/v1/projects/${cloudSetup?.serverless.projectId}/metrics/`,
ashokaditya marked this conversation as resolved.
Show resolved Hide resolved
data: requestBody,
method: 'POST',
headers: {
Expand All @@ -66,7 +67,6 @@ export class AutoOpsAPIService {
}),
};

const cloudSetup = this.appContextService.getCloud();
if (!cloudSetup?.isServerlessEnabled) {
requestConfig.data.stack_version = this.appContextService.getKibanaVersion();
}
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/data_usage/server/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { DataUsageConfigType } from '../config';

export interface DataUsageSetupDependencies {
features: FeaturesPluginSetup;
cloud?: CloudSetup;
}

/* eslint-disable @typescript-eslint/no-empty-interface*/
Expand Down