Skip to content

Commit

Permalink
Bump @opentelemetry/sdk-metrics-base; clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos committed Jul 12, 2022
1 parent b595d89 commit 4ed979b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"@opentelemetry/exporter-metrics-otlp-grpc": "^0.30.0",
"@opentelemetry/exporter-prometheus": "^0.30.0",
"@opentelemetry/resources": "^1.3.1",
"@opentelemetry/sdk-metrics-base": "^0.29.2",
"@opentelemetry/sdk-metrics-base": "^0.30.0",
"@opentelemetry/semantic-conventions": "^1.3.1",
"@reduxjs/toolkit": "^1.6.1",
"@slack/webhook": "^5.0.4",
Expand Down
11 changes: 10 additions & 1 deletion x-pack/plugins/monitoring_collection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,15 @@ This plugin allows for other plugins to add data to Kibana stack monitoring docu
}
```

* Lastly we can use the `metrics` object to instrument the code
`monitoring_collection` plugins has to be initialized before the plugin that will be instrumented. If for some reason the instrumentation doesn't record any metrics, make sure `monitoring_collection` is included in the list of `requiredPlugins`. e.g:

```json
"requiredPlugins": [
"monitoringCollection"
],
```

* Lastly we can use the `metrics` object to instrument the code

```ts
export const initMetricsAPIRoute = (libs: { router: IRouter, metrics: FooApiMeters}) => {
Expand All @@ -101,3 +109,4 @@ This plugin allows for other plugins to add data to Kibana stack monitoring docu
}
);
```

1 change: 1 addition & 0 deletions x-pack/test/api_integration/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./watcher'));
loadTestFile(require.resolve('./logs_ui'));
loadTestFile(require.resolve('./osquery'));
loadTestFile(require.resolve('./monitoring_collection'));
});
}
6 changes: 1 addition & 5 deletions x-pack/test/api_integration/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ export async function getApiIntegrationConfig({ readConfigFile }: FtrConfigProvi
'--xpack.ruleRegistry.write.cache.enabled=false',
'--xpack.uptime.service.password=test',
'--xpack.uptime.service.username=localKibanaIntegrationTestsUser',
`--monitoring_collection.opentelemetry.metrics=${JSON.stringify({
prometheus: {
enabled: true,
},
})}`,
'--monitoring_collection.opentelemetry.metrics.prometheus.enabled=true',
],
},
esTestCluster: {
Expand Down
35 changes: 9 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4417,13 +4417,6 @@
"@mattiasbuelens/web-streams-adapter" "~0.1.0"
web-streams-polyfill "~3.0.3"

"@opentelemetry/[email protected]":
version "0.29.2"
resolved "https://registry.yarnpkg.com/@opentelemetry/api-metrics/-/api-metrics-0.29.2.tgz#daa823e0965754222b49a6ae6133df8b39ff8fd2"
integrity sha512-yRdF5beqKuEdsPNoO7ijWCQ9HcyN0Tlgicf8RS6gzGOI54d6Hj7yKquJ6+X9XV+CSRbRWJYb+lOsXyso7uyX2g==
dependencies:
"@opentelemetry/api" "^1.0.0"

"@opentelemetry/[email protected]":
version "0.30.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api-metrics/-/api-metrics-0.30.0.tgz#b5defd10756e81d1c7ce8669ff8a8d2465ba0be8"
Expand Down Expand Up @@ -4513,14 +4506,6 @@
"@opentelemetry/sdk-metrics-base" "0.30.0"
"@opentelemetry/sdk-trace-base" "1.4.0"

"@opentelemetry/[email protected]", "@opentelemetry/resources@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.3.1.tgz#9fd85ac4ffeefc35441404b384d5c1db8b243121"
integrity sha512-X8bl3X0YjlsHWy0Iv0KUETtZuRUznX4yr1iScKCtfy8AoRfZFc2xxWKMDJ0TrqYwSapgeg4YwpmRzUKmmnrbeA==
dependencies:
"@opentelemetry/core" "1.3.1"
"@opentelemetry/semantic-conventions" "1.3.1"

"@opentelemetry/[email protected]":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.4.0.tgz#5e23b0d7976158861059dec17e0ee36a35a5ab85"
Expand All @@ -4529,7 +4514,15 @@
"@opentelemetry/core" "1.4.0"
"@opentelemetry/semantic-conventions" "1.4.0"

"@opentelemetry/[email protected]":
"@opentelemetry/resources@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.3.1.tgz#9fd85ac4ffeefc35441404b384d5c1db8b243121"
integrity sha512-X8bl3X0YjlsHWy0Iv0KUETtZuRUznX4yr1iScKCtfy8AoRfZFc2xxWKMDJ0TrqYwSapgeg4YwpmRzUKmmnrbeA==
dependencies:
"@opentelemetry/core" "1.3.1"
"@opentelemetry/semantic-conventions" "1.3.1"

"@opentelemetry/[email protected]", "@opentelemetry/sdk-metrics-base@^0.30.0":
version "0.30.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.30.0.tgz#242d9260a89a1ac2bf1e167b3fda758f3883c769"
integrity sha512-3BDg1MYDInDyGvy+bSH8OuCX5nsue7omH6Y2eidCGTTDYRPxDmq9tsRJxnTUepoMAvWX+1sTwZ4JqTFmc1z8Mw==
Expand All @@ -4539,16 +4532,6 @@
"@opentelemetry/resources" "1.4.0"
lodash.merge "4.6.2"

"@opentelemetry/sdk-metrics-base@^0.29.2":
version "0.29.2"
resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.29.2.tgz#bd515455f1d90e211458dcf957f0ae937772b155"
integrity sha512-7hhhZ/6YRRgAXOUTeCsbe6SIk3wZAdAHnEwGGp7aiVH5AOyioHyHInw4EHtowlD6dbLxUWURjh6k+Geht2zbxg==
dependencies:
"@opentelemetry/api-metrics" "0.29.2"
"@opentelemetry/core" "1.3.1"
"@opentelemetry/resources" "1.3.1"
lodash.merge "4.6.2"

"@opentelemetry/[email protected]":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.4.0.tgz#e54d09c1258cd53d3fe726053ed1cbda9d74f023"
Expand Down

0 comments on commit 4ed979b

Please sign in to comment.