Skip to content

Commit 1f7dbb6

Browse files
authored
feat: discourse plugin for sending apm traces to elastic (#1)
* feat: discourse plugin for sending apm traces to elastic * move all code inside the module
1 parent 96dd53b commit 1f7dbb6

17 files changed

+9947
-1
lines changed

.discourse-compatibility

Whitespace-only changes.

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@discourse/lint-configs/eslint");

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
/gems
3+
/auto_generated

.prettierrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@discourse/lint-configs/prettier");

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
inherit_gem:
2+
rubocop-discourse: stree-compat.yml

.template-lintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@discourse/lint-configs/template-lint");

Gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
group :development do
6+
gem "rubocop-discourse"
7+
gem "syntax_tree"
8+
end

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Civilized Discourse Construction Kit, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
# discourse-plugin-elastic-apm
1+
# discourse-plugin-elastic-apm
2+
3+
Refer here for configuration options
4+
5+
https://www.elastic.co/guide/en/apm/agent/ruby/current/configuration.html
6+
7+
Currently, plugin just allows to configure via discourse admin dashboard the following options:
8+
9+
* server_url
10+
* service_name
11+
* secret_token
12+
* transaction_sample_rate
13+
* elastic_apm_log_level
14+
15+
In top of that, extra options can be configured via env variables or the elastic apm page itself. Agent will be pulling for config updates.
16+
17+
NOTE: un order to make the plugin work, rak mini profiler must be disabled. Set the following environment variables in your discourse distribution to disable it
18+
19+
```
20+
DISCOURSE_LOAD_MINI_PROFILER=false
21+
DISABLE_MINI_PROFILER=true
22+
```

assets/javascripts/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)