Skip to content

Commit

Permalink
add container mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszmarcinkowski committed Sep 30, 2024
1 parent 9d040cf commit e4fac40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ export async function getServiceMetadataDetails({
const response = await apmEventClient.search('get_service_metadata_details', params);

const fields = response.hits.hits[0]?.fields;
// todo: missing `fields` property?
const fieldsNorm = (fields ? serviceMetadataDetailsMapping(fields) : undefined) as
| ServiceMetadataDetailsRaw
| undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ export const serviceVersionMapping = (
};
};

// todo: missing `container` and `could` mappings
// todo: missing `could` mapping
export const serviceInstanceMetadataDetailsMapping = (
fields: Partial<Record<string, unknown[]>> = {}
) => {
Expand Down Expand Up @@ -796,6 +796,9 @@ export const serviceInstanceMetadataDetailsMapping = (
uid: normalizeValue<string>(fields[KUBERNETES_POD_UID]),
},
},
container: {
id: normalizeValue<string>(fields[CONTAINER_ID]),
},
};
};

Expand Down

0 comments on commit e4fac40

Please sign in to comment.