This repository has been archived by the owner on May 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Project telemetry data #418
Merged
nelsonkopliku
merged 9 commits into
trento-project:main
from
nelsonkopliku:project_telemetry_data
Nov 4, 2021
Merged
Project telemetry data #418
nelsonkopliku
merged 9 commits into
trento-project:main
from
nelsonkopliku:project_telemetry_data
Nov 4, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nelsonkopliku
requested review from
fabriziosestito,
stefanotorresi,
dottorblaster,
arbulu89 and
rtorrero
November 2, 2021 16:57
arbulu89
suggested changes
Nov 3, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nelsonkopliku ,
I have put a bunch of comments, but I'm just setting the PR to request changes
for the subscription data usage, which I think we should change. Besides this one, everything else is just a opinionated comment hehe
nelsonkopliku
force-pushed
the
project_telemetry_data
branch
from
November 3, 2021 08:19
164d6c2
to
c01c669
Compare
nelsonkopliku
force-pushed
the
project_telemetry_data
branch
2 times, most recently
from
November 3, 2021 14:14
64e6fc6
to
8eae780
Compare
nelsonkopliku
force-pushed
the
project_telemetry_data
branch
2 times, most recently
from
November 3, 2021 16:18
c67d3a2
to
5ef0396
Compare
nelsonkopliku
requested review from
dottorblaster,
fabriziosestito and
arbulu89
November 3, 2021 16:18
arbulu89
approved these changes
Nov 4, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nelsonkopliku ,
Now we will need to see how we can really use this table hehe
…ojector to the Registry
nelsonkopliku
force-pushed
the
project_telemetry_data
branch
from
November 4, 2021 13:02
5ef0396
to
14e3b02
Compare
dottorblaster
approved these changes
Nov 4, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎊🎉🍾
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a Projector for the required Telemetry information.
HostName
SLESVersion
CPUCount
SocketCount
TotalMemoryMB
CloudProvider
This works also as a PoC for projecting the Hosts as a replacement for Consul Catalog.
Extra:
By adding a
we can consider the
cwd
for our tests being the project root, which allows to simplify path specification in tests and allows us to reuse mocks.Example
NewDiscoveredCloudMock
inagent/discovery/mocks/discovered_cloud_mock.go
is used as a source for mocks in two different placesagent/discovery/collector/publishing_test.go
web/datapipeline/telemetry_projector_test.go
Without the trick it would't have been possible to reuse the same
NewDiscoveredCloudMock
because, in respect of the caller executor (publishing_test.go
ortelemetry_projector_test.go
) it would have required to load the same file from a different relative location.So,
calling
NewDiscoveredCloudMock
fromagent/discovery/collector/publishing_test.go
would require loading the fixture from../../../test/fixtures/discovery/azure/azure_discovery.json
while calling
NewDiscoveredCloudMock
fromweb/datapipeline/telemetry_projector_test.go
would require loading the fixture from../../test/fixtures/discovery/azure/azure_discovery.json
Note the difference
../../../
vs../../
with this trick we can consider the cwd as the root of the project so the path to be loaded would always be the same
./test/fixtures/discovery/azure/azure_discovery.json
Hope it makes sense.
What's next:
For telemetry: spike with the team on opentelemetry/promscale/timescale
For consul migration: this opens doors for consul Host catalog replacement by projecting hosts and defining Heartbeat and healthcheck