Skip to content

Commit

Permalink
correct mappings
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <menwe@amazon.com>
  • Loading branch information
mengweieric committed Oct 17, 2024
1 parent fc53f3d commit aa931fa
Show file tree
Hide file tree
Showing 5 changed files with 1,643 additions and 1,698 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
// import { getSavedObjects } from './saved_objects';
import { servicesFieldMappings } from './services_field_mappings';
import { tracesFieldMappings } from './traces_field_mappings';
import { metricsFieldMappings } from './metrics_field_mappings';
import { logsFieldMappings } from './logs_field_mappings';

const otelDataName = i18n.translate('home.sampleData.otelSpecTitle', {
defaultMessage: 'Sample Open-Telemetry logs, Traces and Metrics',
Expand Down Expand Up @@ -47,11 +49,11 @@ export const otelSpecProvider = function (): SampleDatasetSchema {
overwriteSavedObjectsWithWorkspaceId([], workspaceId),
dataIndices: [
{
id: '00000001',
id: '000001',
dataPath: path.join(__dirname, './sample_traces.json.gz'),
fields: tracesFieldMappings,
timeFields: ['startTime', 'endTime', 'traceGroupFields.endTime'], // TODO: add support for 'events.time'
currentTimeMarker: '2024-09-30T21:49:34',
currentTimeMarker: '2024-10-15T03:30:00',
preserveDayOfWeekTimeOfDay: false,
customPrefix: 'otel-v1-apm-span',
},
Expand All @@ -60,10 +62,28 @@ export const otelSpecProvider = function (): SampleDatasetSchema {
dataPath: path.join(__dirname, './sample_service_map.json.gz'),
fields: servicesFieldMappings,
timeFields: [],
currentTimeMarker: '2024-09-30T21:49:34',
currentTimeMarker: '2024-10-15T03:30:00',
preserveDayOfWeekTimeOfDay: false,
customPrefix: 'otel-v1-apm-service',
},
{
id: '2024.10.16',
dataPath: path.join(__dirname, './sample_metrics.json.gz'),
fields: metricsFieldMappings,
timeFields: ['@timestamp', 'exemplar.time', 'startTime', 'time', 'observedTimestamp'],
currentTimeMarker: '2024-10-15T03:30:00',
preserveDayOfWeekTimeOfDay: false,
customPrefix: 'ss4o_metrics-otel',
},
{
id: '2024.10.16',
dataPath: path.join(__dirname, './sample_logs.json.gz'),
fields: logsFieldMappings,
timeFields: ['time', 'observedTime'],
currentTimeMarker: '2024-10-15T03:30:00',
preserveDayOfWeekTimeOfDay: false,
customPrefix: 'otel-events',
},
],
status: 'not_installed',
};
Expand Down
Loading

0 comments on commit aa931fa

Please sign in to comment.