Skip to content

Gitpod CLI: Improve Segment logging #19064

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

Merged
merged 8 commits into from
Nov 17, 2023
Merged

Conversation

filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Nov 13, 2023

Description

Only enables Segment logging when logging verbose output. It means that Segment errors do not get outputted to standard error, because it is not critical to the CLI's functionality.

Summary generated by Copilot

🤖 Generated by Copilot at 91af8d6

Add custom logger for telemetry package and expose log level option to user. This improves the visibility and control of the telemetry output in the local-app component.

Related Issue(s)

Fixes EXP-912

How to test

Personally, I tested by changing the client configuration of Segment to some bogus address.

In the first command, the error is not shown. In the second one, we use verbose output and therefore it is.
image

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@mustard-mh
Copy link
Contributor

mustard-mh commented Nov 13, 2023

If I'm a user, I don't care any respond / process for metrics / telemetry / error report () even in verbose mode

Maybe add another level tracing ?

@filiptronicek
Copy link
Member Author

@mustard-mh fair enough, it maybe should be a different level altogether. Looping in @csweichel, any advice for telemetry logs?

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works, ✔️ to unblock.

I like @mustard-mh suggestion to push it down to trace, but silencing it entirely is also fine I think. Leaving it to @filiptronicek to force the discussion here, to move it to a follow-up PR. 🧘

@filiptronicek
Copy link
Member Author

While we are in preview, I will leave segment errors in verbose output. It would be great to add another logging level, but that adds some complexity, both technical and user-facing (we have --verbose, how would you turn on tracing?).

I also fixed auto-updating by properly proxying the manifest file.

@roboquat roboquat merged commit c00f28a into main Nov 17, 2023
@roboquat roboquat deleted the ft/improve-telemetry-logging branch November 17, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants