Skip to content
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 insight server layer #4

Merged
merged 3 commits into from
Dec 10, 2022
Merged

Conversation

subotic
Copy link
Contributor

@subotic subotic commented Dec 5, 2022

Packages the complete insight server based on ZIO-HTTP into its own layer, that can be added to any ZIO application:

object SampleApp extends ZIOAppDefault with InstrumentedSample {

  private val insightServerConfig = InsightServerConfig(8080, 5.seconds)

  override def run: ZIO[Any with ZIOAppArgs with Scope, Any, Any] =
    program
      .provide(
        insightServerLayer(insightServerConfig),
      )
}

@atooni
Copy link
Member

atooni commented Dec 6, 2022

LGTM - WGYT: With the InsightLayer pushed to the API I think it would make more sense to remove the split between the InstrumentedSample and SampleApp. We want to show that Insight can be used by simply injecting a single layer ??

@subotic subotic marked this pull request as ready for review December 9, 2022 18:22
@subotic
Copy link
Contributor Author

subotic commented Dec 9, 2022

@atooni I've added the changes as discussed.

@atooni atooni merged commit c595c78 into zio:main Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants