Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions src/optimize/bundles_route/bundles_route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { extname, join } from 'path';

import Hapi from '@hapi/hapi';
import * as UiSharedDeps from '@kbn/ui-shared-deps';
import agent from 'elastic-apm-node';

import { createDynamicAssetResponse } from './dynamic_asset_response';
import { FileHashCache } from './file_hash_cache';
Expand Down Expand Up @@ -101,6 +102,8 @@ function buildRouteForBundles({
method(request: Hapi.Request, h: Hapi.ResponseToolkit) {
const ext = extname(request.params.path);

agent.setTransactionName('GET ?/bundles/?');

if (ext !== '.js' && ext !== '.css') {
return h.continue;
}
Expand Down
17 changes: 9 additions & 8 deletions x-pack/plugins/task_manager/server/task_running/task_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ export class TaskManagerRunner implements TaskRunner {
});

const stopTaskTimer = startTaskTimer();
const apmTrans = apm.startTransaction(
`taskManager run ${this.instance.taskType}`,
'taskManager'
);
const apmTrans = apm.startTransaction(`taskManager run`, 'taskManager');
apmTrans?.addLabels({
taskType: this.taskType,
});
try {
this.task = this.definition.createTaskRunner(modifiedContext);
const result = await this.task.run();
Expand Down Expand Up @@ -232,10 +232,11 @@ export class TaskManagerRunner implements TaskRunner {
public async markTaskAsRunning(): Promise<boolean> {
performance.mark('markTaskAsRunning_start');

const apmTrans = apm.startTransaction(
`taskManager markTaskAsRunning ${this.instance.taskType}`,
'taskManager'
);
const apmTrans = apm.startTransaction(`taskManager markTaskAsRunning`, 'taskManager');

apmTrans?.addLabels({
taskType: this.taskType,
});

const now = new Date();
try {
Expand Down