logdna / logdna/logdna-browser
The plugin ConsolePlugin is already registered with LogDNA Browser
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Framework:
- React with webpack
Created a brand new LogDNA key in the portal and am using that in the UI to connect to LogDNA.
Implementation:
`typescript
const [legger] = useState(
logdna.init((process.env.config as unknown as Config).logDnaApiKey, {
hostname: 'al-ui-2',
app: 'al-ui-3',
console: true,
})
);`
package json dependencies

Webpack common
`javascript
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: path.resolve(__dirname, '..', './src/index.tsx'),
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
module: {
rules: [
{
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
},
],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(?:ico|gif|png|jpg|jpeg)$/i,
type: 'asset/resource',
},
{
test: /\.(woff(2)?|eot|ttf|otf|svg|)$/,
type: 'asset/inline',
},
],
},
output: {
path: path.resolve(__dirname, '..', './build'),
filename: 'bundle.js',
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, '..', './src/index.html'),
}),
],
stats: 'errors-only',
};
`
env specific Webpack:

Error in UI(Firefox):

Firefox Console:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Firefox error from the logdna.init call in src/index.tsx using the shown React and webpack setup. Read the common and environment-specific webpack configuration and compare the browser console output; done means the application initializes without the duplicate ConsolePlugin registration error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, webpack
- Domain
- frontend, observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100