Skip to content

Commit

Permalink
fix: semcov alignment & reduce import bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Netail committed Mar 29, 2024
1 parent b2bcbed commit 2c6d8cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/opentelemetry-host-metrics/src/enum.ts
Expand Up @@ -34,9 +34,7 @@ export enum ATTRIBUTE_NAMES {
SYSTEM_DEVICE = 'system.device',
SYSTEM_NETWORK_DIRECTION = 'system.network.direction',
SYSTEM_NETWORK_STATE = 'system.network.state',
// TODO: change value if semconv changes
// https://github.com/open-telemetry/opentelemetry-specification/issues/3776
PROCESS_CPU_STATE = 'state',
PROCESS_CPU_STATE = 'process.cpu.state',
}

export enum CPU_LABELS {
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-host-metrics/src/stats/si.ts
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

import * as SI from 'systeminformation';
import { networkStats } from 'systeminformation/lib/network';
import { NetworkData } from '../types';

export function getNetworkData() {
return new Promise<NetworkData[]>(resolve => {
SI.networkStats()
networkStats()
.then(resolve)
.catch(() => {
resolve([]);
Expand Down

0 comments on commit 2c6d8cf

Please sign in to comment.