Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Seq Extension #513

Merged
merged 8 commits into from
Jun 13, 2020
Merged

Seq Extension #513

merged 8 commits into from
Jun 13, 2020

Conversation

razfriman
Copy link
Contributor

@razfriman razfriman commented May 29, 2020

Attempt to fix #512

This successfully starts Seq, creates an entry on the Tye dashboard, includes the SEQ logs, enables a link to view the Seq dashboard.

This is my first attempt at contributing to Tye and any feedback or guidance would be highly appreciated.

@dnfclas
Copy link

dnfclas commented May 29, 2020

CLA assistant check
All CLA requirements met.

@razfriman
Copy link
Contributor Author

razfriman commented May 29, 2020

Uploading screenshots to include them in the Markdown docs:

Screen Shot 2020-05-29 at 8 37 03 pm

Screen Shot 2020-05-29 at 8 42 27 pm

Screen Shot 2020-05-29 at 8 36 49 pm

Screen Shot 2020-05-29 at 8 46 26 pm

Screen Shot 2020-05-29 at 8 49 19 pm

@razfriman
Copy link
Contributor Author

razfriman commented May 29, 2020

Help Requested:

Not sure how to get the formatting to pass CI - I am developing on Rider on Mac OSX. Any attempt to run an autoformat fails to pass CI - any tips on this? Also any tips on which encoding to set the file, the default for me is not passing CI.

EDIT: Resolved - Thank you @TimHess

@areller
Copy link
Contributor

areller commented May 29, 2020

@razfriman I also use Rider. I usually run dotnet format (you need to install the tool first)

@razfriman
Copy link
Contributor Author

@razfriman I also use Rider. I usually run dotnet format (you need to install the tool first)

Thanks for the tip, I didn’t know this dotnet tool existed! Will check it out today

var sidecar = DiagnosticAgent.GetOrAddSidecar(project);

// Use service discovery to find seq
sidecar.Args.Add("--provider:seq=service:seq");
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn’t find much information on how this sidecar is implemented. (Maybe the code is in the repository and I totally overlooked it?)

However, I followed the existing patterns from the Elastic extensions and the logs did indeed get pushed into Seq.

—-

I did test this using the Frontend-backend example and that is how I provided the screenshots.

I will have a 2nd look to see if I can write up some sort of test to verify more of this functionality

Copy link
Contributor Author

@razfriman razfriman May 29, 2020

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Did you deploy and see if it worked?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually don't have a Kubernetes cluster set up (locally or cloud). Is there any other way to test to see if this works?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not today, we don't support other deployment targets nor do we have CI tests which run with kubernetes. We are working on getting some of that bootstrapped soon.

See https://github.com/dotnet/tye/blob/master/docs/tutorials/hello-tye/01_deploy.md#getting-started-with-deployment for some guidance on how to a cluster setup.

Copy link
Member

Choose a reason for hiding this comment

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

The code for the sidecar is here if you want to peep it: https://github.com/dotnet/tye/tree/master/src/tye-diag-agent


The `logPath` property here configures the path where Seq will store its data.

> :bulb: Tye can successfully launch Seq without `logPath`, but ... It's *highly* recommended that you specify a path to store the logs and configuration (add to `.gitignore` if it's part of your repository). Kibana has some mandatory setup the first time you use it, and without persisting the data, you will have to go through it each time.
Copy link
Member

Choose a reason for hiding this comment

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

Is this actually true for Seq? it looks like this is a copy-paste from the Elastic stack docs

Copy link
Member

Choose a reason for hiding this comment

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

Yea there's some copy pasta here.

@jkotalik jkotalik added this to the 0.3 milestone Jun 8, 2020
@jkotalik
Copy link
Contributor

I'm going to try running these personally 😄

@jkotalik
Copy link
Contributor

Found one small issue for tye deploy, otherwise got it working. I'm going to write some docs for tye run and tye deploy for elastic and seq.

@jkotalik jkotalik merged commit c016f38 into dotnet:master Jun 13, 2020
@jkotalik
Copy link
Contributor

Thanks @razfriman

@davidfowl
Copy link
Member

W00p!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging Extension - Seq
7 participants