-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add upload of installation script logs #1312
Conversation
I'm just realizing: this probably needs a PowerShell equivalent for Windows installations... |
ef03a50
to
adbf7a0
Compare
The backend does not currently handle `Content-Encoding` headers properly anymore. See: https://sumologic.atlassian.net/browse/SUMO-232957
bae0f6b
to
ac928f0
Compare
Add --disable-installation-telemetry for Linux Add -DisableInstallationTelemetry for Windows Signed-off-by: Cyril Cressent <ccressent@sumologic.com>
Signed-off-by: Cyril Cressent <ccressent@sumologic.com>
Add --installation-logfile-endpoint on Linux Add -InstallationLogfileEndpoint on Windows Signed-off-by: Cyril Cressent <ccressent@sumologic.com>
scripts/install.sh
Outdated
@@ -170,6 +181,14 @@ Supported env variables: | |||
EOF | |||
} | |||
|
|||
function reporter { | |||
if ! $DISABLE_INSTALLATION_TELEMETRY; then | |||
echo "SUMOLOGIC_INSTALLATION_TOKEN=${SUMOLOGIC_INSTALLATION_TOKEN}" >> $INSTALLATION_LOGFILE |
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.
Could we use some hash to not store token directly inside the file and send it as source header? Right now we are going to get one line with the token and then multiple lines which will be hard to say which installation token are related
I think X-Sumo-Name
would be the best choice 🤔
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.
Not 100% sure if X-Sumo-Name
is the best choice; what about using X-Sumo-Fields
instead with a value of installation-token-sha256=<value>
?
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.
Whether I use X-Sumo-Name
or X-Sumo-Fields
for the headers I send to the endpoint I was provided with, that data doesn't seem to make it into Sumo.
I had to remove compression already because it turned out the Content-Type
header is not supported by the endpoint. I wonder if whatever they put in place just ignores headers. I'll get in touch with the team in charge of that endpoint.
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.
The team has confirmed that those headers are not supported; it's still unclear to me whether or not they'll work on supporting them.
Can you see a different way to accomplish the same idea?
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.
If the endpoint treats all the data like multiline log I think it's fine, Otherwise I would put hash on the beginning of every line, so we do not loose the context
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.
The hosted collector (otel-installation-logs-collector
) is setup with multilineProcessingEnabled: true
, so I think it's fine indeed.
I suggest we go with what we have so that we can start collecting and analyzing data. We can then alter what we collect as needed. |
@ccressent I've moved the install scripts to https://github.com/SumoLogic/sumologic-otel-collector-packaging/tree/main/install-script and we're planning to remove them from this repo in #1536. Can you recreate this PR in packaging? |
Closing in favour of SumoLogic/sumologic-otel-collector-packaging#64 |
As part of OSC-174 and to close SUMO-227556, we need to collect the installation script's actions and send that log to Sumologic for further processing.
This PR is the piece that makes the installation script log everything it does into a file and send that file to a Sumo endpoint whenever and for whatever reason the installation script exits.
Note that the log collection endpoint is still set to its staging version while we wait for the production version to be deployed.
Example log data gathered during a CI run