-
Notifications
You must be signed in to change notification settings - Fork 581
feat: bring back browser extension #1152
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
Changes from 2 commits
2b2b62a
1328baa
8898778
41d96bf
be3d49b
720786a
65da98f
ed7f4b1
9c40889
4cab851
004ebc3
b89606e
9aa97b1
82e0392
71787a2
c64cbcd
04dceec
a0351e5
6118091
bc73fc1
8006737
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@opentelemetry/browser-extension-autoinjection", | ||
"version": "0.29.0", | ||
"version": "0.32.0", | ||
"description": "A browser extension that injects opentelemetry tracers into any website", | ||
"scripts": { | ||
"clean": "rimraf build/*", | ||
|
@@ -13,6 +13,7 @@ | |
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/browser-extension-autoinjection --include-dependencies", | ||
"prewatch": "npm run precompile", | ||
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", | ||
"version:update": "node ../../scripts/version-update.js", | ||
"tdd": "npm run test -- --watch-extensions ts --watch", | ||
"watch": "npx webpack --mode=development --watch", | ||
"watch:mv2": "npx webpack --mode=development --watch --env MV=2", | ||
|
@@ -26,60 +27,62 @@ | |
"node": ">=8.12.0" | ||
}, | ||
"peerDependencies": { | ||
"@opentelemetry/api": "^1.0.0" | ||
"@opentelemetry/api": "^1.2.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why upgrade the "@opentelemetry/api" minimum supported minor versions? If the user is using an older version of the API, will it fail to work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why I changed it, it should work with 1.0 as well |
||
}, | ||
"devDependencies": { | ||
"@opentelemetry/api": "^1.0.0", | ||
"@types/chrome": "0.0.154", | ||
"@types/jsdom": "16.2.13", | ||
"@opentelemetry/api": "^1.2.0", | ||
"@types/chrome": "0.0.196", | ||
"@types/jsdom": "16.2.15", | ||
"@types/mocha": "8.2.3", | ||
"@types/react": "17.0.16", | ||
"@types/react-dom": "18.0.2", | ||
"@types/sinon": "10.0.2", | ||
"@types/sinon-chrome": "2.2.11", | ||
"@typescript-eslint/eslint-plugin": "5.8.1", | ||
"@typescript-eslint/parser": "5.8.1", | ||
"@typescript-eslint/eslint-plugin": "5.36.1", | ||
"@typescript-eslint/parser": "5.36.1", | ||
"eslint": "8.7.0", | ||
"eslint-config-airbnb-base": "15.0.0", | ||
"eslint-plugin-header": "3.1.1", | ||
"eslint-plugin-import": "2.25.4", | ||
"eslint-plugin-import": "2.26.0", | ||
"eslint-plugin-json5": "0.1.4", | ||
"gts": "3.1.0", | ||
"html-webpack-plugin": "5.3.2", | ||
"html-webpack-plugin": "5.5.0", | ||
"jimp": "0.16.1", | ||
"jsdom": "15.2.1", | ||
"jsdom": "16.7.0", | ||
"mocha": "7.2.0", | ||
"null-loader": "4.0.1", | ||
"nyc": "15.1.0", | ||
"responsive-loader": "2.3.0", | ||
"responsive-loader": "3.1.1", | ||
"rimraf": "3.0.2", | ||
"sharp": "^0.30.7", | ||
"sinon": "14.0.0", | ||
"sinon-chrome": "3.0.1", | ||
"ts-loader": "9.2.5", | ||
"ts-mocha": "10.0.0", | ||
"typescript": "4.3.5", | ||
"webpack": "5.48.0", | ||
"webpack-cli": "4.7.2", | ||
"webpack": "5.74.0", | ||
"webpack-cli": "4.10.0", | ||
"webpack-merge": "5.8.0" | ||
}, | ||
"dependencies": { | ||
"@material-ui/core": "4.12.3", | ||
"@material-ui/icons": "4.11.2", | ||
"@material-ui/lab": "4.0.0-alpha.60", | ||
"@material-ui/core": "4.12.4", | ||
"@material-ui/icons": "4.11.3", | ||
"@material-ui/lab": "4.0.0-alpha.61", | ||
"@opentelemetry/context-zone": "^1.0.0", | ||
"@opentelemetry/core": "^1.0.0", | ||
"@opentelemetry/exporter-trace-otlp-http": "^0.29.2", | ||
"@opentelemetry/exporter-trace-otlp-http": "^0.32.0", | ||
"@opentelemetry/exporter-zipkin": "^1.0.0", | ||
"@opentelemetry/instrumentation": "^0.29.2", | ||
"@opentelemetry/instrumentation-document-load": "^0.29.0", | ||
"@opentelemetry/instrumentation-fetch": "^0.29.2", | ||
"@opentelemetry/instrumentation-xml-http-request": "^0.29.2", | ||
"@opentelemetry/instrumentation": "^0.32.0", | ||
"@opentelemetry/instrumentation-document-load": "^0.30.0", | ||
"@opentelemetry/instrumentation-fetch": "^0.32.0", | ||
"@opentelemetry/instrumentation-user-interaction": "^0.31.0", | ||
"@opentelemetry/instrumentation-xml-http-request": "^0.32.0", | ||
"@opentelemetry/resources": "^1.0.0", | ||
"@opentelemetry/sdk-trace-base": "^1.0.0", | ||
"@opentelemetry/sdk-trace-web": "^1.0.0", | ||
"@opentelemetry/semantic-conventions": "^1.0.0", | ||
"change-case": "4.1.2", | ||
"json5": "2.2.0", | ||
"json5": "2.2.1", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2" | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
server { | ||
listen 80 default_server; | ||
server_name _; | ||
location / { | ||
# Take care of preflight requests | ||
if ($request_method = 'OPTIONS') { | ||
add_header 'Access-Control-Max-Age' 1728000; | ||
add_header "Access-Control-Allow-Origin" "$http_origin" always; | ||
add_header 'Access-Control-Allow-Headers' 'Accept,Accept-Language,Content-Language,Content-Type,X-Requested-With' always; | ||
add_header 'Access-Control-Allow-Credentials' 'true' always; | ||
add_header 'Content-Type' 'text/plain charset=UTF-8'; | ||
add_header 'Content-Length' 0; | ||
return 204; | ||
} | ||
|
||
add_header "Access-Control-Allow-Origin" "$http_origin" always; | ||
add_header 'Access-Control-Allow-Credentials' 'true' always; | ||
add_header 'Access-Control-Allow-Headers' 'Accept,Accept-Language,Content-Language,Content-Type,X-Requested-With' always; | ||
proxy_http_version 1.1; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_pass http://collector:4318; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: "2" | ||
services: | ||
jaeger: | ||
image: jaegertracing/all-in-one:latest | ||
environment: | ||
- COLLECTOR_OTLP_ENABLED=true | ||
ports: | ||
- "16686:16686" | ||
proxy: | ||
image: nginx:latest | ||
ports: | ||
- "4318:80" | ||
volumes: | ||
- ./default.conf:/etc/nginx/conf.d/default.conf | ||
depends_on: | ||
- collector | ||
collector: | ||
image: otel/opentelemetry-collector:latest | ||
command: ["--config=/etc/otel-collector-config.yaml"] | ||
volumes: | ||
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml | ||
depends_on: | ||
- jaeger |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
http: | ||
include_metadata: true | ||
processors: | ||
resource: | ||
attributes: | ||
- key: browser.user_agent | ||
from_context: User-Agent | ||
action: upsert | ||
attributes: | ||
actions: | ||
- key: http.client_ip | ||
from_context: X-Forwarded-For | ||
action: upsert | ||
|
||
exporters: | ||
otlp: | ||
endpoint: jaeger:4317 | ||
tls: | ||
insecure: true | ||
insecure_skip_verify: true | ||
logging: | ||
|
||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [resource,attributes] | ||
exporters: [logging, otlp] |
Uh oh!
There was an error while loading. Please reload this page.