forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] New icons for azure and aws architecture (elastic#146406)
## Summary This PR is focusing on closing two tickets elastic#143503 and elastic#143421. There are a bunch of new icons for AWS and Azure architecture that are being added and would be visualized as a dependency. There is also a synthrace scenario added in this PR, which would allow for a better review of how it would look like. We can use this scenario for testing more things in the future. ![image](https://user-images.githubusercontent.com/13353203/204303766-ded68f88-d968-4690-bc9e-378638ac155c.png) ![image](https://user-images.githubusercontent.com/13353203/204303800-4c587f3e-9b10-4b45-8e25-f1d1ed85afcd.png) ![image](https://user-images.githubusercontent.com/13353203/204303819-22a35b49-6d62-40be-97b3-5e292571b39b.png) ![image](https://user-images.githubusercontent.com/13353203/204303844-ce465b22-a838-469a-a32e-db18f00acc0a.png) Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
858abb8
commit 8382355
Showing
13 changed files
with
404 additions
and
11 deletions.
There are no files selected for viewing
194 changes: 194 additions & 0 deletions
194
packages/kbn-apm-synthtrace/src/scenarios/cloud_services_icons.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { apm, timerange } from '../..'; | ||
import { ApmFields } from '../lib/apm/apm_fields'; | ||
import { Instance } from '../lib/apm/instance'; | ||
import { Scenario } from '../cli/scenario'; | ||
import { getLogger } from '../cli/utils/get_common_services'; | ||
import { RunOptions } from '../cli/utils/parse_run_cli_flags'; | ||
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment'; | ||
|
||
const ENVIRONMENT = getSynthtraceEnvironment(__filename); | ||
|
||
const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => { | ||
const logger = getLogger(runOptions); | ||
|
||
const { numServices = 3 } = runOptions.scenarioOpts || {}; | ||
|
||
return { | ||
generate: ({ from, to }) => { | ||
const range = timerange(from, to); | ||
|
||
const transactionName = 'Azure-AWS-Transaction'; | ||
|
||
const successfulTimestamps = range.ratePerMinute(60); | ||
|
||
const instances = [...Array(numServices).keys()].map((index) => | ||
apm | ||
.service({ name: `synth-java-${index}`, environment: ENVIRONMENT, agentName: 'java' }) | ||
.instance('instance') | ||
); | ||
const instanceSpans = (instance: Instance) => { | ||
const successfulTraceEvents = successfulTimestamps.generator((timestamp) => | ||
instance | ||
.transaction({ transactionName }) | ||
.timestamp(timestamp) | ||
.duration(1000) | ||
.success() | ||
.children( | ||
instance | ||
.span({ | ||
spanName: 'AWS DynamoDB', | ||
spanType: 'db', | ||
spanSubtype: 'dynamodb', | ||
'service.target.type': 'dynamodb', | ||
'span.destination.service.resource': 'dynamodb', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp), | ||
instance | ||
.span({ | ||
spanName: 'AWS SQS', | ||
spanType: 'messaging', | ||
spanSubtype: 'sqs', | ||
'service.target.type': 'sqs', | ||
'service.target.name': 'queueA', | ||
'span.destination.service.resource': 'sqs/queueA', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 50), | ||
instance | ||
.span({ | ||
spanName: 'AWS SQS', | ||
spanType: 'messaging', | ||
spanSubtype: 'sqs', | ||
'service.target.type': 'sqs', | ||
'service.target.name': 'queueB', | ||
'span.destination.service.resource': 'sqs/queueB', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 100), | ||
instance | ||
.span({ | ||
spanName: 'AWS SNS', | ||
spanType: 'messaging', | ||
spanSubtype: 'sns', | ||
'service.target.type': 'sns', | ||
'span.destination.service.resource': 'sns', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 150), | ||
instance | ||
.span({ | ||
spanName: 'AWS S3', | ||
spanType: 'storage', | ||
spanSubtype: 's3', | ||
'service.target.type': 's3', | ||
'service.target.name': 'bucketA', | ||
'span.destination.service.resource': 's3/bucketA', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 200), | ||
instance | ||
.span({ | ||
spanName: 'AWS S3', | ||
spanType: 'storage', | ||
spanSubtype: 's3', | ||
'service.target.type': 's3', | ||
'service.target.name': 'bucketB', | ||
'span.destination.service.resource': 's3/bucketB', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 250), | ||
instance | ||
.span({ | ||
spanName: 'Azure CosmosDB', | ||
spanType: 'db', | ||
spanSubtype: 'cosmosdb', | ||
'service.target.type': 'cosmosdb', | ||
'span.destination.service.resource': 'cosmosdb', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 300), | ||
instance | ||
.span({ | ||
spanName: 'Azure Queue', | ||
spanType: 'messaging', | ||
spanSubtype: 'azurequeue', | ||
'service.target.type': 'azurequeue', | ||
'span.destination.service.resource': 'azurequeue', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 350), | ||
instance | ||
.span({ | ||
spanName: 'Azure Service Bus', | ||
spanType: 'messaging', | ||
spanSubtype: 'azureservicebus', | ||
'service.target.type': 'azureservicebus', | ||
'span.destination.service.resource': 'azureservicebus', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 400), | ||
instance | ||
.span({ | ||
spanName: 'Azure Blob', | ||
spanType: 'storage', | ||
spanSubtype: 'azureblob', | ||
'service.target.type': 'azureblob', | ||
'span.destination.service.resource': 'azureblob', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 450), | ||
instance | ||
.span({ | ||
spanName: 'Azure File', | ||
spanType: 'storage', | ||
spanSubtype: 'azurefile', | ||
'service.target.type': 'azurefile', | ||
'span.destination.service.resource': 'azurefile', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 500), | ||
instance | ||
.span({ | ||
spanName: 'Azure Table', | ||
spanType: 'storage', | ||
spanSubtype: 'azuretable', | ||
'service.target.type': 'azuretable', | ||
'span.destination.service.resource': 'azuretable', | ||
}) | ||
.duration(50) | ||
.success() | ||
.timestamp(timestamp + 550) | ||
) | ||
); | ||
|
||
return successfulTraceEvents; | ||
}; | ||
|
||
return instances | ||
.map((instance) => logger.perf('generating_apm_events', () => instanceSpans(instance))) | ||
.reduce((p, c) => p.merge(c)); | ||
}, | ||
}; | ||
}; | ||
|
||
export default scenario; |
21 changes: 21 additions & 0 deletions
21
x-pack/plugins/apm/public/components/shared/agent_icon/icons/functions.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
x-pack/plugins/apm/public/components/shared/span_icon/icons/blob_storage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
x-pack/plugins/apm/public/components/shared/span_icon/icons/cosmos_db.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.