Skip to content

Commit

Permalink
Merge pull request #37 from inaimathi/namespace-instrumentation
Browse files Browse the repository at this point in the history
Add instrument-namespace! function
  • Loading branch information
MalloZup authored Oct 31, 2019
2 parents 8d27268 + cc1f50b commit 1318ba0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/iapetos/collector/fn.clj
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@
:or {fn-name (subs (str fn-var) 2)}
:as options}]
(instrument!* registry fn-name fn-var options)))

(defn instrument-namespace!
([registry namespace] (instrument-namespace! registry namespace {}))
([registry namespace options]
(->> namespace
ns-publics vals
(filter #(fn? (var-get %)))
(map #(instrument! registry % options)))))

0 comments on commit 1318ba0

Please sign in to comment.