Skip to content
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

[APM Agent] Replace support for apm.dev.js with support for kibana.dev.yml in apm-config-loader #79490

Closed
joshdover opened this issue Oct 5, 2020 · 9 comments
Labels
apm:Agent Configuration chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@joshdover
Copy link
Contributor

Currently, the @kbn/apm-config-loader package supports a special kibana.dev.js file for configuring the APM agent in development. This should be replaced with the more standard supported kibana.dev.yml file for a more standard development experience

@joshdover joshdover added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc apm:Agent Configuration labels Oct 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@pgayvallet
Copy link
Contributor

This should be replaced with the more standard supported kibana.dev.yml file

Is this file still used though? I don't see anything adding it to the list of config files in dev mode in src/cli.

@joshdover joshdover removed their assignment Dec 2, 2020
@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Dec 3, 2020

Possibly a related issue: #84840

@trentm
Copy link
Member

trentm commented Dec 4, 2020

The current support is apm.dev.js, rather than kibana.dev.js, right?

packages/kbn-apm-config-loader/src/config.ts
129:      const apmDevConfigPath = join(this.rootDir, 'config', 'apm.dev.js');

packages/kbn-apm-config-loader/src/config.test.mocks.ts
34:jest.doMock(join(mockedRootDir, 'config', 'apm.dev.js'), () => devConfigMock.raw, {

x-pack/plugins/fleet/dev_docs/tracing.md
14:      - <details><summary>via env variable or <code>config/apm.dev.js</code></summary>
20:      - By default traces are sent to a remote server, but you can send to a local APM by setting the <code>serverUrl</code> value in  <code>config/apm.dev.js</code>

docs/developer/getting-started/debugging.asciidoc
31:creating an appropriate config file under `config/apm.dev.js`. For
36:Example `config/apm.dev.js` file:

@trentm
Copy link
Member

trentm commented Dec 4, 2020

At #84840 (comment) @tylersmalley mentioned that he and @watson had discussed keeping "apm.dev.js" support. I don't have a strong opinion either way (I'm not a Kibana dev, I'm new to the Node.js APM team), but I'm slightly biased against having .js executable config files.

@watson
Copy link
Contributor

watson commented Dec 4, 2020

I can just give my 5 cents on why I opted to support JS config files to begin with:

Sometimes it's nice to be able to load config programatically, e.g. say you want to set the agent to active depending on for instance the content of an environment variable:

active: process.env.NODE_ENV === 'production'

Or maybe you want to set some global tags based on the content of a file, e.g:

globalLabels: {
  uuid: fs.readFileSync('./data/uuid', { encoding: 'utf8' })
}

However these are of course not 100% necessary and there are other workaround to achieve the same goal without having Kibana look for this file on boot.

@joshdover joshdover changed the title [APM Agent] Replace support for kibana.dev.js with support for kibana.dev.yml in apm-config-loader [APM Agent] Replace support for apm.dev.js with support for kibana.dev.yml in apm-config-loader Dec 4, 2020
@Mpdreamz
Copy link
Member

Mpdreamz commented Aug 9, 2022

I think this can now be closed as of #127892 👍 cc @lizozom

@sorenlouv
Copy link
Member

@joshdover should the docs be updated? I tried adding config/apm.dev.js and it didn't work.

@sorenlouv
Copy link
Member

sorenlouv commented Feb 13, 2023

FYI: for others looking for how to enable APM instrumentation in Kibana. It seems that the approach today is to use kibana.dev.yml like this:

elastic:
  apm:
    active: true
    serverUrl: http://localhost:8200
    secretToken: very_secret
    centralConfig: true
    breakdownMetrics: true
    transactionSampleRate: 0.1

carlyrichmond added a commit that referenced this issue Mar 8, 2023
…s with kibana.dev.yml (#152237)

## Summary

Updating the Debugging Kibana documentation:

1. Adding Python as additional pre-requisite technology
2. Replacing apm.dev.js configuration with updated kibana.dev.yml
approach

Similar to recent discussion in issue #79490, I've found that the
`apm.dev.js` approach is no longer working.


### Checklist

Delete any items that are not applicable to this PR.

- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### Risk Matrix

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Mar 8, 2023
…s with kibana.dev.yml (elastic#152237)

## Summary

Updating the Debugging Kibana documentation:

1. Adding Python as additional pre-requisite technology
2. Replacing apm.dev.js configuration with updated kibana.dev.yml
approach

Similar to recent discussion in issue elastic#79490, I've found that the
`apm.dev.js` approach is no longer working.

### Checklist

Delete any items that are not applicable to this PR.

- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### Risk Matrix

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 867c906)
kibanamachine added a commit that referenced this issue Mar 8, 2023
…erences with kibana.dev.yml (#152237) (#152914)

# Backport

This will backport the following commits from `main` to `8.7`:
- [Updating debugging docs: replacing apm.dev.js configuration
references with kibana.dev.yml
(#152237)](#152237)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carly
Richmond","email":"74931905+carlyrichmond@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-03-08T14:43:34Z","message":"Updating
debugging docs: replacing apm.dev.js configuration references with
kibana.dev.yml (#152237)\n\n## Summary\r\n\r\nUpdating the Debugging
Kibana documentation:\r\n\r\n1. Adding Python as additional
pre-requisite technology\r\n2. Replacing apm.dev.js configuration with
updated kibana.dev.yml\r\napproach\r\n\r\nSimilar to recent discussion
in issue #79490, I've found that the\r\n`apm.dev.js` approach is no
longer working.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that
are not applicable to this PR.\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n\r\n### Risk
Matrix\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"867c906f6c872357b5e2e6335c5145d1f58e3730","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:fix","💝community","backport-v8.0.0","v8.7.0","v8.8.0","v8.7.1"],"number":152237,"url":"https://github.com/elastic/kibana/pull/152237","mergeCommit":{"message":"Updating
debugging docs: replacing apm.dev.js configuration references with
kibana.dev.yml (#152237)\n\n## Summary\r\n\r\nUpdating the Debugging
Kibana documentation:\r\n\r\n1. Adding Python as additional
pre-requisite technology\r\n2. Replacing apm.dev.js configuration with
updated kibana.dev.yml\r\napproach\r\n\r\nSimilar to recent discussion
in issue #79490, I've found that the\r\n`apm.dev.js` approach is no
longer working.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that
are not applicable to this PR.\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n\r\n### Risk
Matrix\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"867c906f6c872357b5e2e6335c5145d1f58e3730"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152237","number":152237,"mergeCommit":{"message":"Updating
debugging docs: replacing apm.dev.js configuration references with
kibana.dev.yml (#152237)\n\n## Summary\r\n\r\nUpdating the Debugging
Kibana documentation:\r\n\r\n1. Adding Python as additional
pre-requisite technology\r\n2. Replacing apm.dev.js configuration with
updated kibana.dev.yml\r\napproach\r\n\r\nSimilar to recent discussion
in issue #79490, I've found that the\r\n`apm.dev.js` approach is no
longer working.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that
are not applicable to this PR.\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n\r\n### Risk
Matrix\r\n\r\nN/A\r\n\r\n### For maintainers\r\n\r\n- [ ] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"867c906f6c872357b5e2e6335c5145d1f58e3730"}}]}]
BACKPORT-->

Co-authored-by: Carly Richmond <74931905+carlyrichmond@users.noreply.github.com>
sloanelybutsurely pushed a commit to sloanelybutsurely/kibana that referenced this issue Mar 8, 2023
…s with kibana.dev.yml (elastic#152237)

## Summary

Updating the Debugging Kibana documentation:

1. Adding Python as additional pre-requisite technology
2. Replacing apm.dev.js configuration with updated kibana.dev.yml
approach

Similar to recent discussion in issue elastic#79490, I've found that the
`apm.dev.js` approach is no longer working.


### Checklist

Delete any items that are not applicable to this PR.

- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### Risk Matrix

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this issue Mar 10, 2023
…s with kibana.dev.yml (elastic#152237)

## Summary

Updating the Debugging Kibana documentation:

1. Adding Python as additional pre-requisite technology
2. Replacing apm.dev.js configuration with updated kibana.dev.yml
approach

Similar to recent discussion in issue elastic#79490, I've found that the
`apm.dev.js` approach is no longer working.


### Checklist

Delete any items that are not applicable to this PR.

- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### Risk Matrix

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
nkhristinin pushed a commit that referenced this issue Mar 22, 2023
…s with kibana.dev.yml (#152237)

## Summary

Updating the Debugging Kibana documentation:

1. Adding Python as additional pre-requisite technology
2. Replacing apm.dev.js configuration with updated kibana.dev.yml
approach

Similar to recent discussion in issue #79490, I've found that the
`apm.dev.js` approach is no longer working.


### Checklist

Delete any items that are not applicable to this PR.

- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### Risk Matrix

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:Agent Configuration chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

8 participants