Skip to content

Commit

Permalink
Revert "[Logs Overview] Overview component (iteration 1) (#191899)"
Browse files Browse the repository at this point in the history
This reverts commit 15bccdf.
  • Loading branch information
Ikuni17 committed Oct 9, 2024
1 parent d2644ff commit a31b16e
Show file tree
Hide file tree
Showing 75 changed files with 56 additions and 3,405 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,6 @@ module.exports = {
files: [
'x-pack/plugins/observability_solution/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'src/plugins/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
'x-pack/packages/observability/logs_overview/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)',
],
rules: {
'@kbn/i18n/strings_should_be_translated_with_i18n': 'warn',
Expand Down
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,6 @@ x-pack/packages/observability/alerting_test_data @elastic/obs-ux-management-team
x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops
x-pack/packages/observability/get_padded_alert_time_range_util @elastic/obs-ux-management-team
x-pack/plugins/observability_solution/observability_logs_explorer @elastic/obs-ux-logs-team
x-pack/packages/observability/logs_overview @elastic/obs-ux-logs-team
x-pack/plugins/observability_solution/observability_onboarding/e2e @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team
x-pack/plugins/observability_solution/observability_onboarding @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team
x-pack/plugins/observability_solution/observability @elastic/obs-ux-management-team
Expand Down
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0",
"@types/react": "~18.2.0",
"@types/react-dom": "~18.2.0",
"@xstate5/react/**/xstate": "^5.18.1",
"globby/fast-glob": "^3.2.11"
},
"dependencies": {
Expand Down Expand Up @@ -688,7 +687,6 @@
"@kbn/observability-fixtures-plugin": "link:x-pack/test/cases_api_integration/common/plugins/observability",
"@kbn/observability-get-padded-alert-time-range-util": "link:x-pack/packages/observability/get_padded_alert_time_range_util",
"@kbn/observability-logs-explorer-plugin": "link:x-pack/plugins/observability_solution/observability_logs_explorer",
"@kbn/observability-logs-overview": "link:x-pack/packages/observability/logs_overview",
"@kbn/observability-onboarding-plugin": "link:x-pack/plugins/observability_solution/observability_onboarding",
"@kbn/observability-plugin": "link:x-pack/plugins/observability_solution/observability",
"@kbn/observability-shared-plugin": "link:x-pack/plugins/observability_solution/observability_shared",
Expand Down Expand Up @@ -1052,7 +1050,6 @@
"@turf/helpers": "6.0.1",
"@turf/length": "^6.0.2",
"@xstate/react": "^3.2.2",
"@xstate5/react": "npm:@xstate/react@^4.1.2",
"adm-zip": "^0.5.9",
"ai": "^2.2.33",
"ajv": "^8.12.0",
Expand Down Expand Up @@ -1286,7 +1283,6 @@
"whatwg-fetch": "^3.0.0",
"xml2js": "^0.5.0",
"xstate": "^4.38.2",
"xstate5": "npm:xstate@^5.18.1",
"xterm": "^5.1.0",
"yauzl": "^2.10.0",
"yazl": "^2.5.1",
Expand All @@ -1308,7 +1304,6 @@
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-transform-class-properties": "^7.24.7",
"@babel/plugin-transform-logical-assignment-operators": "^7.24.7",
"@babel/plugin-transform-numeric-separator": "^7.24.7",
"@babel/plugin-transform-runtime": "^7.24.7",
"@babel/preset-env": "^7.24.7",
Expand Down
12 changes: 0 additions & 12 deletions packages/kbn-apm-synthtrace-client/src/lib/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export type ObjectEntry<T> = [keyof T, T[keyof T]];

export type Fields<TMeta extends Record<string, any> | undefined = undefined> = {
'@timestamp'?: number;
} & (TMeta extends undefined ? {} : Partial<{ meta: TMeta }>);
Expand All @@ -29,14 +27,4 @@ export class Entity<TFields extends Fields> {

return this;
}

overrides(overrides: Partial<TFields>) {
const overrideEntries = Object.entries(overrides) as Array<ObjectEntry<TFields>>;

overrideEntries.forEach(([fieldName, value]) => {
this.fields[fieldName] = value;
});

return this;
}
}
74 changes: 0 additions & 74 deletions packages/kbn-apm-synthtrace-client/src/lib/gaussian_events.ts

This file was deleted.

10 changes: 1 addition & 9 deletions packages/kbn-apm-synthtrace-client/src/lib/infra/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface HostDocument extends Fields {
'cloud.provider'?: string;
}

export class Host extends Entity<HostDocument> {
class Host extends Entity<HostDocument> {
cpu({ cpuTotalValue }: { cpuTotalValue?: number } = {}) {
return new HostMetrics({
...this.fields,
Expand Down Expand Up @@ -175,11 +175,3 @@ export function host(name: string): Host {
'cloud.provider': 'gcp',
});
}

export function minimalHost(name: string): Host {
return new Host({
'agent.id': 'synthtrace',
'host.hostname': name,
'host.name': name,
});
}
3 changes: 1 addition & 2 deletions packages/kbn-apm-synthtrace-client/src/lib/infra/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { dockerContainer, DockerContainerMetricsDocument } from './docker_container';
import { host, HostMetricsDocument, minimalHost } from './host';
import { host, HostMetricsDocument } from './host';
import { k8sContainer, K8sContainerMetricsDocument } from './k8s_container';
import { pod, PodMetricsDocument } from './pod';
import { awsRds, AWSRdsMetricsDocument } from './aws/rds';
Expand All @@ -24,7 +24,6 @@ export type InfraDocument =

export const infra = {
host,
minimalHost,
pod,
dockerContainer,
k8sContainer,
Expand Down
18 changes: 3 additions & 15 deletions packages/kbn-apm-synthtrace-client/src/lib/interval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ interface IntervalOptions {
rate?: number;
}

interface StepDetails {
stepMilliseconds: number;
}

export class Interval<TFields extends Fields = Fields> {
private readonly intervalAmount: number;
private readonly intervalUnit: unitOfTime.DurationConstructor;
Expand All @@ -50,16 +46,12 @@ export class Interval<TFields extends Fields = Fields> {
this._rate = options.rate || 1;
}

private getIntervalMilliseconds(): number {
return moment.duration(this.intervalAmount, this.intervalUnit).asMilliseconds();
}

private getTimestamps() {
const from = this.options.from.getTime();
const to = this.options.to.getTime();

let time: number = from;
const diff = this.getIntervalMilliseconds();
const diff = moment.duration(this.intervalAmount, this.intervalUnit).asMilliseconds();

const timestamps: number[] = [];

Expand All @@ -76,19 +68,15 @@ export class Interval<TFields extends Fields = Fields> {
*generator<TGeneratedFields extends Fields = TFields>(
map: (
timestamp: number,
index: number,
stepDetails: StepDetails
index: number
) => Serializable<TGeneratedFields> | Array<Serializable<TGeneratedFields>>
): SynthtraceGenerator<TGeneratedFields> {
const timestamps = this.getTimestamps();
const stepDetails: StepDetails = {
stepMilliseconds: this.getIntervalMilliseconds(),
};

let index = 0;

for (const timestamp of timestamps) {
const events = castArray(map(timestamp, index, stepDetails));
const events = castArray(map(timestamp, index));
index++;
for (const event of events) {
yield event;
Expand Down
21 changes: 0 additions & 21 deletions packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export type LogDocument = Fields &
'event.duration': number;
'event.start': Date;
'event.end': Date;
labels?: Record<string, string>;
test_field: string | string[];
date: Date;
severity: string;
Expand Down Expand Up @@ -157,26 +156,6 @@ function create(logsOptions: LogsOptions = defaultLogsOptions): Log {
).dataset('synth');
}

function createMinimal({
dataset = 'synth',
namespace = 'default',
}: {
dataset?: string;
namespace?: string;
} = {}): Log {
return new Log(
{
'input.type': 'logs',
'data_stream.namespace': namespace,
'data_stream.type': 'logs',
'data_stream.dataset': dataset,
'event.dataset': dataset,
},
{ isLogsDb: false }
);
}

export const log = {
create,
createMinimal,
};
53 changes: 0 additions & 53 deletions packages/kbn-apm-synthtrace-client/src/lib/poisson_events.test.ts

This file was deleted.

Loading

0 comments on commit a31b16e

Please sign in to comment.