-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move apm tutorial from apm plugin into apm_oss plugin #66432
Merged
DianaDerevyankina
merged 8 commits into
elastic:master
from
DianaDerevyankina:Diana/65629
May 20, 2020
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
286a45f
Move apm tutorial from apm plugin into apm_oss plugin
DianaDerevyankina a0cf025
Merge branch 'DianaDerevyankina' into Diana/65629
DianaDerevyankina 0b87b9a
Fix types issues and some paths
DianaDerevyankina 3ee097a
Add unregisterTutorial to tutorials_registry.mock
DianaDerevyankina 09fa018
Merge branch 'DianaDerevyankina' into Diana/65629
DianaDerevyankina d85152f
Add apm path to .i18nrc.json to fix internationalization error
DianaDerevyankina ff2345e
Rename apm path in .i18nrc.json into apmOss and revert some imports p…
DianaDerevyankina b0e08ae
Merge branch 'DianaDerevyankina' into Diana/65629
DianaDerevyankina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,20 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export const APM_STATIC_INDEX_PATTERN_ID = 'apm_static_index_pattern_id'; |
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 |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
"configPath": [ | ||
"apm_oss" | ||
], | ||
"ui": false, | ||
"requiredPlugins": [] | ||
"ui": true, | ||
"requiredPlugins": ["home"] | ||
} |
File renamed without changes
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,27 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { ApmOssPlugin } from './plugin'; | ||
|
||
// This exports static code and TypeScript types, | ||
// as well as, Kibana Platform `plugin()` initializer. | ||
export function plugin() { | ||
return new ApmOssPlugin(); | ||
} | ||
export { ApmOssPluginSetup, ApmOssPluginStart } from './types'; |
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,33 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { CoreSetup, CoreStart, Plugin } from 'kibana/public'; | ||
import { ApmOssPluginSetup, ApmOssPluginStart } from './types'; | ||
|
||
export class ApmOssPlugin implements Plugin<ApmOssPluginSetup, ApmOssPluginStart> { | ||
public setup(core: CoreSetup): ApmOssPluginSetup { | ||
return {}; | ||
} | ||
|
||
public start(core: CoreStart): ApmOssPluginStart { | ||
return {}; | ||
} | ||
|
||
public stop() {} | ||
} |
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,27 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface ApmOssPluginSetup {} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface ApmOssPluginStart {} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface AppPluginStartDependencies {} |
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
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
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,203 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { INSTRUCTION_VARIANT } from '../../../../home/server'; | ||
import { | ||
createWindowsServerInstructions, | ||
createEditConfig, | ||
createStartServerUnixSysv, | ||
createStartServerUnix, | ||
createDownloadServerRpm, | ||
createDownloadServerDeb, | ||
createDownloadServerOsx, | ||
} from '../instructions/apm_server_instructions'; | ||
import { | ||
createNodeAgentInstructions, | ||
createDjangoAgentInstructions, | ||
createFlaskAgentInstructions, | ||
createRailsAgentInstructions, | ||
createRackAgentInstructions, | ||
createJsAgentInstructions, | ||
createGoAgentInstructions, | ||
createJavaAgentInstructions, | ||
createDotNetAgentInstructions, | ||
} from '../instructions/apm_agent_instructions'; | ||
|
||
export function onPremInstructions({ | ||
errorIndices, | ||
transactionIndices, | ||
metricsIndices, | ||
sourcemapIndices, | ||
onboardingIndices, | ||
}: { | ||
errorIndices: string; | ||
transactionIndices: string; | ||
metricsIndices: string; | ||
sourcemapIndices: string; | ||
onboardingIndices: string; | ||
}) { | ||
const EDIT_CONFIG = createEditConfig(); | ||
const START_SERVER_UNIX = createStartServerUnix(); | ||
const START_SERVER_UNIX_SYSV = createStartServerUnixSysv(); | ||
|
||
return { | ||
instructionSets: [ | ||
{ | ||
title: i18n.translate('apm.tutorial.apmServer.title', { | ||
defaultMessage: 'APM Server', | ||
}), | ||
callOut: { | ||
title: i18n.translate('apm.tutorial.apmServer.callOut.title', { | ||
defaultMessage: 'Important: Updating to 7.0 or higher', | ||
}), | ||
message: i18n.translate('apm.tutorial.apmServer.callOut.message', { | ||
defaultMessage: `Please make sure your APM Server is updated to 7.0 or higher. \ | ||
You can also migrate your 6.x data with the migration assistant found in Kibana's management section.`, | ||
}), | ||
iconType: 'alert', | ||
}, | ||
instructionVariants: [ | ||
{ | ||
id: INSTRUCTION_VARIANT.OSX, | ||
instructions: [createDownloadServerOsx(), EDIT_CONFIG, START_SERVER_UNIX], | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.DEB, | ||
instructions: [createDownloadServerDeb(), EDIT_CONFIG, START_SERVER_UNIX_SYSV], | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.RPM, | ||
instructions: [createDownloadServerRpm(), EDIT_CONFIG, START_SERVER_UNIX_SYSV], | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.WINDOWS, | ||
instructions: createWindowsServerInstructions(), | ||
}, | ||
], | ||
statusCheck: { | ||
title: i18n.translate('apm.tutorial.apmServer.statusCheck.title', { | ||
defaultMessage: 'APM Server status', | ||
}), | ||
text: i18n.translate('apm.tutorial.apmServer.statusCheck.text', { | ||
defaultMessage: | ||
'Make sure APM Server is running before you start implementing the APM agents.', | ||
}), | ||
btnLabel: i18n.translate('apm.tutorial.apmServer.statusCheck.btnLabel', { | ||
defaultMessage: 'Check APM Server status', | ||
}), | ||
success: i18n.translate('apm.tutorial.apmServer.statusCheck.successMessage', { | ||
defaultMessage: 'You have correctly setup APM Server', | ||
}), | ||
error: i18n.translate('apm.tutorial.apmServer.statusCheck.errorMessage', { | ||
defaultMessage: | ||
'No APM Server detected. Please make sure it is running and you have updated to 7.0 or higher.', | ||
}), | ||
esHitsCheck: { | ||
index: onboardingIndices, | ||
query: { | ||
bool: { | ||
filter: [ | ||
{ term: { 'processor.event': 'onboarding' } }, | ||
{ range: { 'observer.version_major': { gte: 7 } } }, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
title: i18n.translate('apm.tutorial.apmAgents.title', { | ||
defaultMessage: 'APM Agents', | ||
}), | ||
instructionVariants: [ | ||
{ | ||
id: INSTRUCTION_VARIANT.JAVA, | ||
instructions: createJavaAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.JS, | ||
instructions: createJsAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.NODE, | ||
instructions: createNodeAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.DJANGO, | ||
instructions: createDjangoAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.FLASK, | ||
instructions: createFlaskAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.RAILS, | ||
instructions: createRailsAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.RACK, | ||
instructions: createRackAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.GO, | ||
instructions: createGoAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.DOTNET, | ||
instructions: createDotNetAgentInstructions(), | ||
}, | ||
], | ||
statusCheck: { | ||
title: i18n.translate('apm.tutorial.apmAgents.statusCheck.title', { | ||
defaultMessage: 'Agent status', | ||
}), | ||
text: i18n.translate('apm.tutorial.apmAgents.statusCheck.text', { | ||
defaultMessage: | ||
'Make sure your application is running and the agents are sending data.', | ||
}), | ||
btnLabel: i18n.translate('apm.tutorial.apmAgents.statusCheck.btnLabel', { | ||
defaultMessage: 'Check agent status', | ||
}), | ||
success: i18n.translate('apm.tutorial.apmAgents.statusCheck.successMessage', { | ||
defaultMessage: 'Data successfully received from one or more agents', | ||
}), | ||
error: i18n.translate('apm.tutorial.apmAgents.statusCheck.errorMessage', { | ||
defaultMessage: 'No data has been received from agents yet', | ||
}), | ||
esHitsCheck: { | ||
index: [errorIndices, transactionIndices, metricsIndices, sourcemapIndices], | ||
query: { | ||
bool: { | ||
filter: [ | ||
{ | ||
terms: { | ||
'processor.event': ['error', 'transaction', 'metric', 'sourcemap'], | ||
}, | ||
}, | ||
{ range: { 'observer.version_major': { gte: 7 } } }, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add the public plugin boilerplate? It looks like this is just a server side thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flash1293 I think it's ok cause we have one asset here:
src/plugins/apm_oss/public/assets/apm.png
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point, missed that.