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

feat: full HTTP request logging #5234

Merged
merged 16 commits into from
Aug 1, 2024
Merged

feat: full HTTP request logging #5234

merged 16 commits into from
Aug 1, 2024

Conversation

n1ru4l
Copy link
Contributor

@n1ru4l n1ru4l commented Jul 16, 2024

Background

It was impossible to get any useful information about the HTTP requests sent from the SDK/Supergraph fetcher.
This PR introduces logging for all things around that.

Description

Checklist

  • Input validation
  • Output encoding
  • Authentication management
  • Session management
  • Access control
  • Cryptographic practices
  • Error handling and logging
  • Data protection
  • Communication security
  • System configuration
  • Database security
  • File management
  • Memory management
  • Testing

Copy link

changeset-bot bot commented Jul 16, 2024

🦋 Changeset detected

Latest commit: c5ccdc3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@graphql-hive/apollo Minor
@graphql-hive/core Minor
@graphql-hive/yoga Minor
@graphql-hive/cli Minor
@graphql-hive/envelop Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jul 16, 2024

🐋 This PR was built and pushed to the following Docker images (tag: c5ccdc35b9d636f64e5ce5500066da28a937a75c):

Docker Bake metadata
{
"app": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/tzk6vejgj101tsa95m1i63b4x",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:da41a3923fb709e61cefd7e42a0b5e056588bda82ff14a1d1c92aad61c407622",
    "size": 685
  },
  "containerimage.digest": "sha256:da41a3923fb709e61cefd7e42a0b5e056588bda82ff14a1d1c92aad61c407622",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/app:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/app:feat_http_logging"
},
"composition-federation-2": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/j1hzixbusmx28yv5yowcr7vtj",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:3c3be9485f955bb15e3b4c7b94168c12a3e7ac985eef15b15774fc00815704c4",
    "size": 685
  },
  "containerimage.digest": "sha256:3c3be9485f955bb15e3b4c7b94168c12a3e7ac985eef15b15774fc00815704c4",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:feat_http_logging"
},
"emails": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/m412tsct634rpfrx6azmaxumv",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:79c0f0b2a162c7405c69a664f8e50def93bbfa847d34ed30df8081ab1086e3c4",
    "size": 685
  },
  "containerimage.digest": "sha256:79c0f0b2a162c7405c69a664f8e50def93bbfa847d34ed30df8081ab1086e3c4",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/emails:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/emails:feat_http_logging"
},
"policy": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/w0evk6ugdpzuhshwhg8nsy4gu",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:a02672191bf5fdb2b6bc973d5076c247f856c3fc9a497d89c38a98908993b217",
    "size": 685
  },
  "containerimage.digest": "sha256:a02672191bf5fdb2b6bc973d5076c247f856c3fc9a497d89c38a98908993b217",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/policy:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/policy:feat_http_logging"
},
"rate-limit": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/k3168d458x0w2g5f2ev4irakc",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:efcf701a0449c59a7a6895d5e3de83d7ab19e0b0717ed1d86e184e064f3eba41",
    "size": 685
  },
  "containerimage.digest": "sha256:efcf701a0449c59a7a6895d5e3de83d7ab19e0b0717ed1d86e184e064f3eba41",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/rate-limit:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/rate-limit:feat_http_logging"
},
"schema": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/k3bj3cfhnn9gia5epn576ord0",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:9b1b84965bb15b7a458141ee0f8e5cc5bba0ef196c5848d940cc4f69a868cea1",
    "size": 685
  },
  "containerimage.digest": "sha256:9b1b84965bb15b7a458141ee0f8e5cc5bba0ef196c5848d940cc4f69a868cea1",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/schema:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/schema:feat_http_logging"
},
"server": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/vzmoym4wko946n929jo9j95br",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:bbf3c22c26d5246f659d363692fd5b4ca7a09ffc556eb23d2671d802b1d3d73b",
    "size": 685
  },
  "containerimage.digest": "sha256:bbf3c22c26d5246f659d363692fd5b4ca7a09ffc556eb23d2671d802b1d3d73b",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/server:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/server:feat_http_logging"
},
"storage": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/v9d0n12eqsw1iaui9t2g91i3s",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:ae130efa67a953f1afa2faf0e786746bd36fa8ee3555c8a446bfa47774e0ebbc",
    "size": 685
  },
  "containerimage.digest": "sha256:ae130efa67a953f1afa2faf0e786746bd36fa8ee3555c8a446bfa47774e0ebbc",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/storage:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/storage:feat_http_logging"
},
"stripe-billing": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/tirh4sxpmxusc9s4ju59hz9v0",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:02d4f1aff7cc4d0763282c97005129cc6161a818e53b7f3275ea3527e596bf84",
    "size": 685
  },
  "containerimage.digest": "sha256:02d4f1aff7cc4d0763282c97005129cc6161a818e53b7f3275ea3527e596bf84",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/stripe-billing:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/stripe-billing:feat_http_logging"
},
"tokens": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/9cjzlp2wx1tkrr94qjvpjwb4v",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:1f32bba7513573c37dcfb6acdbdfec5b27b6b8140752ff253ebb32ec695024d4",
    "size": 685
  },
  "containerimage.digest": "sha256:1f32bba7513573c37dcfb6acdbdfec5b27b6b8140752ff253ebb32ec695024d4",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/tokens:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/tokens:feat_http_logging"
},
"usage": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/uypy7e5g7i92t7szbsqaf1da9",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:70e6d138894325ab96694dd9fd59ce9224ff77f0a3b812f46130388a3f43ac12",
    "size": 685
  },
  "containerimage.digest": "sha256:70e6d138894325ab96694dd9fd59ce9224ff77f0a3b812f46130388a3f43ac12",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/usage:feat_http_logging"
},
"usage-estimator": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/12pzs2rf63jkmq69tgy5k3pzz",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:542c01da4e2ef0b344f6395649f10cf6153a18af2c22a53b829a27c27c0b7a3c",
    "size": 685
  },
  "containerimage.digest": "sha256:542c01da4e2ef0b344f6395649f10cf6153a18af2c22a53b829a27c27c0b7a3c",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-estimator:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/usage-estimator:feat_http_logging"
},
"usage-ingestor": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/udmyroo4skeikij2r2vj2bk9l",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:90b0647374b5a9df6528322d506a62a9aff096e58af6c6c42d56527d34db7312",
    "size": 685
  },
  "containerimage.digest": "sha256:90b0647374b5a9df6528322d506a62a9aff096e58af6c6c42d56527d34db7312",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:feat_http_logging"
},
"webhooks": {
  "buildx.build.ref": "builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca/builder-4b9c2bdb-6013-4abf-8494-6cdbacc50fca0/j7pgkxfgrixn9ylf0nitf6uli",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:224b04af79817fd86dd227ba5ecd70ebf4e1ff2de8b597786a3b186c94ab3dff",
    "size": 685
  },
  "containerimage.digest": "sha256:224b04af79817fd86dd227ba5ecd70ebf4e1ff2de8b597786a3b186c94ab3dff",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/webhooks:c5ccdc35b9d636f64e5ce5500066da28a937a75c,ghcr.io/kamilkisiela/graphql-hive/webhooks:feat_http_logging"
}
}

@n1ru4l n1ru4l force-pushed the feat-http-logging branch 2 times, most recently from 3612d15 to f2bba49 Compare July 19, 2024 14:52
@n1ru4l n1ru4l force-pushed the feat-http-logging branch from f2bba49 to b8e027e Compare August 1, 2024 08:16
@n1ru4l n1ru4l force-pushed the feat-http-logging branch from 73198d2 to 4436de6 Compare August 1, 2024 09:58
@n1ru4l n1ru4l force-pushed the feat-http-logging branch from 4436de6 to 6b4ac02 Compare August 1, 2024 10:02
@n1ru4l n1ru4l marked this pull request as ready for review August 1, 2024 10:02
@n1ru4l n1ru4l requested a review from kamilkisiela August 1, 2024 10:02
Copy link
Contributor

github-actions bot commented Aug 1, 2024

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/apollo 0.34.0-alpha-20240801145404-c5ccdc35b9d636f64e5ce5500066da28a937a75c npm ↗︎ unpkg ↗︎
@graphql-hive/cli 0.40.0-alpha-20240801145404-c5ccdc35b9d636f64e5ce5500066da28a937a75c npm ↗︎ unpkg ↗︎
@graphql-hive/core 0.6.0-alpha-20240801145404-c5ccdc35b9d636f64e5ce5500066da28a937a75c npm ↗︎ unpkg ↗︎
@graphql-hive/envelop 0.33.4-alpha-20240801145404-c5ccdc35b9d636f64e5ce5500066da28a937a75c npm ↗︎ unpkg ↗︎
@graphql-hive/yoga 0.34.0-alpha-20240801145404-c5ccdc35b9d636f64e5ce5500066da28a937a75c npm ↗︎ unpkg ↗︎

@n1ru4l n1ru4l force-pushed the feat-http-logging branch from 2b45582 to a458bfb Compare August 1, 2024 10:28
@n1ru4l n1ru4l requested a review from enisdenjo August 1, 2024 10:43
@kamilkisiela kamilkisiela enabled auto-merge (squash) August 1, 2024 14:54
@kamilkisiela kamilkisiela merged commit e6dc5c9 into main Aug 1, 2024
27 checks passed
@kamilkisiela kamilkisiela deleted the feat-http-logging branch August 1, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants