Skip to content

Conversation

sujankota
Copy link
Contributor

@sujankota sujankota commented Nov 1, 2024

  • Adds otel based tracing to kas methods: publicKey and rewrap
    • adds trace top level config to viper config, including trace.enabled (boolean) for enabling otel tracer, and trace.folder for setting the folder to store the trace.log file
  • Adds new examples benchmark command to run encrypt/decrypt and rewrap benchmarks
    • Also adds a job to the checks.yaml to run it, but it is pretty bare-bones for now, and doesn't have any checks against performance regressions or anything.
  • Variety of small linter fixes
tdf3:
Benchmark Results:
Total Requests: 5000
Successful Requests: 5000
Failed Requests: 0
Concurrent Requests: 50
Total Time: 1m7.704277611s
Average Latency: 673.018399ms
Throughput: 73.85 requests/second

nano:
Benchmark Results:
Total Requests: 5000
Successful Requests: 4992
Failed Requests: 8
Concurrent Requests: 50
Total Time: 57.72426082s
Average Latency: 575.422342ms
Throughput: 86.48 requests/second

Error Summary:
ReadNanoTDF error: readSeeker.Seek failed: error making nano rewrap request to kas: error making rewrap request: rpc error: code = PermissionDenied desc = request error
rpc error: code = PermissionDenied desc = forbidden: 8 occurrences


Trace Statistics:

publickey:
  Total Requests: 2
  Average Duration: 0.073 ms (72.647 µs, 72647 ns)
  Min Duration: 0.030 ms (2[9](https://github.com/opentdf/platform/actions/runs/12053261131/job/33608512613?pr=1702#step:17:10).937 µs, 29937 ns)
  Max Duration: 0.[11](https://github.com/opentdf/platform/actions/runs/12053261131/job/33608512613?pr=1702#step:17:12)5 ms (115.357 µs, 115357 ns)

rewrap-tdf3:
  Total Requests: 5000
  Average Duration: 316.499 ms (316498.907 µs, 316498907 ns)
  Min Duration: 23.608 ms (23607.787 µs, 23607787 ns)
  Max Duration: 979.418 ms (979417.815 µs, 979417815 ns)

rewrap-nanotdf:
  Total Requests: 4776
  Average Duration: 320.718 ms (320717.904 µs, 320717904 ns)
  Min Duration: 22.802 ms (22801.981 µs, 22801981 ns)
  Max Duration: 874.830 ms (874829.7[13](https://github.com/opentdf/platform/actions/runs/12053261131/job/33608512613?pr=1702#step:17:14) µs, 874829713 ns)

@sujankota sujankota changed the title feat(kas) - collect metrics feat(kas): collect metrics Nov 6, 2024
@sujankota sujankota marked this pull request as ready for review November 6, 2024 18:37
@sujankota sujankota requested review from a team as code owners November 6, 2024 18:37
pflynn-virtru
pflynn-virtru previously approved these changes Nov 8, 2024
@sujankota sujankota requested a review from a team as a code owner November 13, 2024 21:54
@jrschumacher
Copy link
Member

@sujankota could we add a github-script step to post the results of the benchmark process to the PR? Something like:

Credit ChatGPT

- name: Post benchmark results as a PR comment
  if: ${{ github.event_name == 'pull_request' }}
  uses: actions/github-script@v6
  with:
    script: |
      const results = process.env.RESULTS;
      const commentBody = `
<details>
  <summary>Benchmark Results</summary>

  \`\`\`shell
  ${results}
  \`\`\`
</details>
      `;
      const { data: comments } = await github.rest.issues.listComments({
        owner: context.repo.owner,
        repo: context.repo.repo,
        issue_number: context.issue.number,
      });

      const existingComment = comments.find(comment => 
        comment.user.login === 'github-actions[bot]' && 
        comment.body.includes('<summary>Benchmark Results</summary>')
      );

      if (existingComment) {
        await github.rest.issues.updateComment({
          owner: context.repo.owner,
          repo: context.repo.repo,
          comment_id: existingComment.id,
          body: commentBody,
        });
      } else {
        await github.rest.issues.createComment({
          owner: context.repo.owner,
          repo: context.repo.repo,
          issue_number: context.issue.number,
          body: commentBody,
        });
      }
    env:
      RESULTS: ${{ steps.previous_step_name.outputs.results }}

@dmihalcik-virtru dmihalcik-virtru added this pull request to the merge queue Nov 27, 2024
Merged via the queue into main with commit def28d1 Nov 27, 2024
22 checks passed
@dmihalcik-virtru dmihalcik-virtru deleted the feat/collect-metric branch November 27, 2024 19:37
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.4.31](service/v0.4.30...service/v0.4.31)
(2024-12-02)


### Features

* **kas:** collect metrics
([#1702](#1702))
([def28d1](def28d1))
* **policy:** 1500 Attribute create with Values (one RPC Call) should
employ a db transaction
([#1778](#1778))
([90edbde](90edbde))


### Bug Fixes

* **core:** move auth interceptor to top of chain
([#1790](#1790))
([f9f5a75](f9f5a75))
* **policy:** return fqns in list subject mappings
([#1796](#1796))
([c0a9dda](c0a9dda))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.3](lib/flattening/v0.1.2...lib/flattening/v0.1.3)
(2024-12-17)


### Features

* **kas:** collect metrics
([#1702](#1702))
([def28d1](def28d1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.2.10](lib/fixtures/v0.2.9...lib/fixtures/v0.2.10)
(2024-12-17)


### Features

* **kas:** collect metrics
([#1702](#1702))
([def28d1](def28d1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Jan 8, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.3.24](sdk/v0.3.23...sdk/v0.3.24)
(2025-01-08)


### Features

* **core:** Expose version info
([#1841](#1841))
([92a9f5e](92a9f5e))
* **kas:** collect metrics
([#1702](#1702))
([def28d1](def28d1))


### Bug Fixes

* **core:** Update fixtures and flattening in sdk and service
([#1827](#1827))
([d6d6a7a](d6d6a7a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Feb 25, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.1.8](lib/ocrypto/v0.1.7...lib/ocrypto/v0.1.8)
(2025-02-25)


### Features

* **core:** EXPERIMENTAL: EC-wrapped key support
([#1902](#1902))
([652266f](652266f))
* **kas:** collect metrics
([#1702](#1702))
([def28d1](def28d1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
Co-authored-by: Jake Van Vorhis <[email protected]>
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.

6 participants