chore: remove duplicate hostname resource attribute (#1581)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
This commit is contained in:
parent
e62c4817bc
commit
83e6af093d
|
|
@ -71,7 +71,6 @@ class AwsEc2Detector implements Detector {
|
|||
[HOST_RESOURCE.ID]: instanceId,
|
||||
[HOST_RESOURCE.TYPE]: instanceType,
|
||||
[HOST_RESOURCE.NAME]: hostname,
|
||||
[HOST_RESOURCE.HOSTNAME]: hostname,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,12 +47,6 @@ export const CONTAINER_RESOURCE = {
|
|||
|
||||
/** Attributes defining a computing instance (e.g. host). */
|
||||
export const HOST_RESOURCE = {
|
||||
/**
|
||||
* Hostname of the host. It contains what the hostname command returns on the
|
||||
* host machine.
|
||||
*/
|
||||
HOSTNAME: 'host.hostname',
|
||||
|
||||
/**
|
||||
* Unique host id. For Cloud this must be the instance_id assigned by the
|
||||
* cloud provider
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ describe('assertHostResource', () => {
|
|||
|
||||
it('validates optional attributes', () => {
|
||||
const resource = new Resource({
|
||||
[HOST_RESOURCE.HOSTNAME]: 'opentelemetry-test-hostname',
|
||||
[HOST_RESOURCE.ID]: 'opentelemetry-test-id',
|
||||
[HOST_RESOURCE.NAME]: 'opentelemetry-test-name',
|
||||
[HOST_RESOURCE.TYPE]: 'n1-standard-1',
|
||||
|
|
|
|||
|
|
@ -122,11 +122,6 @@ export const assertHostResource = (
|
|||
}
|
||||
) => {
|
||||
assertHasOneLabel(HOST_RESOURCE, resource);
|
||||
if (validations.hostName)
|
||||
assert.strictEqual(
|
||||
resource.attributes[HOST_RESOURCE.HOSTNAME],
|
||||
validations.hostName
|
||||
);
|
||||
if (validations.id)
|
||||
assert.strictEqual(resource.attributes[HOST_RESOURCE.ID], validations.id);
|
||||
if (validations.name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue